title: form_for error messages in Ruby on Rails
body: <p>What is the preferred way to display validation error messages using <code>form_for</code> in Rails 4?</p>
  
  <pre><code>&lt;%= form_for @post do |f| %&gt;
    ...
  &lt;% end %&gt;
  </code></pre>