title: NoMethodError in Posts#show geocoder
body: <p>So I'm using the <code>geocoder</code> gem. I'm getting a method error in <code>posts#show</code> on line 8. It's basically saying that longitude is undefined.  </p>
  
  <p><a href="https://i.stack.imgur.com/fwz1q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fwz1q.png" alt="enter image description here"></a></p>
  
  <p><strong>_form,html.erb</strong></p>
  
  <pre><code> &lt;%= form_with(model: post, local: true) do |form| %&gt;
    &lt;% if post.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
         &lt;h2&gt;&lt;%= pluralize(post.errors.count, "error") %&gt; prohibited this 
      post from being saved:&lt;/h2&gt;
  
        &lt;ul&gt;
        &lt;% post.errors.full_messages.each do |message| %&gt;
          &lt;li&gt;&lt;%= message %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;div class="field"&gt;
      &lt;%= form.label :date %&gt;
      &lt;%= form.datetime_select :date, id: :post_date %&gt;
    &lt;/div&gt;
  
    &lt;div class="field"&gt;
      &lt;%= form.label :name %&gt;
      &lt;%= form.text_area :name, id: :post_name %&gt;
    &lt;/div&gt;
  
    &lt;div class="action"&gt;
      &lt;%= form.label :address %&gt;
      &lt;%= form.text_area :address, id: "post_address" %&gt;
    &lt;/div&gt;
  
    &lt;div class="field"&gt;
      &lt;%= form.label :user_id %&gt;
      &lt;%= form.number_field :user_id, id: :post_user_id, value: current_user.id %&gt;
  
    &lt;/div&gt;
  
    &lt;div class="field"&gt;
      &lt;%= form.label :description %&gt;
      &lt;%= form.text_area :description, id: :post_description %&gt;
    &lt;/div&gt;
  
    &lt;div class="actions"&gt;
      &lt;%= form.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>post.rb</strong></p>
  
  <pre><code>class Post &lt; ApplicationRecord
   belongs_to :user
   geocoded_by :address
   after_validation :geocode, if: :address_changed?
  end
  </code></pre>
  
  <p><strong>show.html.erb</strong></p>
  
  <pre><code> &lt;p&gt; where: &lt;%=@post.longitude %&gt;, &lt;%=@post.latitude%&gt;&lt;/p&gt;
  </code></pre>
  
  <p><strong>posts_controller_rb</strong></p>
  
  <pre><code>def post_params
        params.require(:post).permit(:date, :user_id, :description, :name, :address)
  end
  load_and_authorize_resource
  </code></pre>
  
  <p>I'm not exactly sure what the error is but I'm sure there's something wrong. I've tried looking into this problem but with no success. I would appreciate the help.</p>