# Deprecated <%= error_messages_for :question %> # Use partial in app/views/shared <% if target.errors.any? %><% end %> # Render partial in view <%= render "shared/error_messages", :target => @question %><%= pluralize(target.errors.count, "error") %> prohibited this record from being saved:
<% target.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
Thursday, November 11, 2010
Error messages for Rails 3
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment