<% form_for(@product) do |f| %>
<%= f.error_messages %>
<%= f.label :description %>
<%= f.text_field :description %>
<%= f.label :value %>
<%= f.text_field :value %>
<%= f.submit "Create" %>
<% end %>
To get the idea, if you submit the form with empty fields you typically get this back, though styles are indeed missing by default:
!images/error_messages.png(Error messages)!
You can also use the +error_messages_for+ helper to display the error messages of a model assigned to a view template. It's very similar to the previous example and will achieve exactly the same result.