The simplest way (but also the least customizable) is to add <%=
error_messages_for ‘objectname’ %>
within your view. In your action you need to stick something like
render :action => ‘pagename’ in your controller, where ‘pagename’
corresponds to the view containing the error message helper.
If/when you need to tweak things slightly, try something like
<% unless @post.errors.empty? %>
The post couldn’t be saved due to these errors: