title: Default values not working Ruby On Rails
body: <p>Initially i had <code>&lt;%= @place.vicinity ||= @place.location.display_address[0] %&gt;</code> but it threw error</p>
  
  <blockquote>
    <p>undefined method `vicinity' for &lt;
    BurstStruct::Burst:0x00000006126ff0></p>
  </blockquote>
  
  <p>I tried with only <code>||</code> also and with <code>@place.vicinity.present?</code> also but the same error .when i echos my <code>@place.location.display_address[0]</code>, it is present . so i thought that may be due to non presence of <code>vicinity</code> member in the class it's throwing error ( despite i've tested it with <code>nil?</code> operator also) then i tried the <code>ternary oprator</code> like below and still the same error :/<br>
      <code>&lt;%= @place.vicinity.nil? ? @place.location.display_address[0] :@place.vicinity  %&gt;</code>
  <br> any help and suggestion will be appreciated</p>
  
  <p><strong>Update</strong> <br>
  What i'm doing actually that When i call for the yelp it returns me location and when i call Google i return "vicinity" - so no classes</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>def index
    phone_number =params["phone_number"]
    if params["provider"] == 'GOOGLE'
      client = GooglePlaces::Client.new("Qf4D-GJpap09o")
      @place =  client.spot(params["place_id"])  
    elsif params["provider"] == 'yelp'
      yelp_client = Yelp::client 
      @place = yelp_client.business(params["place_id"])   
    end
  end
  </code></pre>