title: Get validation errors on a partial's form
body: <p>So I have a form in my Rails app that's on a <code>_form.html.erb</code>.</p>
  
  <p>I'm displaying this partial on every page of my site, so it doesn't really have any model logic behind it, and the User created form it is made on the fly in the view:</p>
  
  <pre><code>&lt;%= form_for User.new, :validate =&gt; true do |f| %&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;%= f.label :invitation_token, "Invite Token" %&gt;&lt;/td&gt;
        &lt;td&gt;&lt;%= f.text_field :invitation_token, :placeholder =&gt; "From your inbox&amp;hellip;".html_safe %&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2"&gt;&lt;br&gt;&lt;%= f.submit "Sign Up" %&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>I have some validations in my User model, but how would I display those validation errors in my view after reload?</strong></p>
  
  <p><em>I've tried <code>User.new.errors.inspect</code> but the messages parameter is always empty, even if there's a validation error.</em></p>