Return to Snippet

Revision: 9449
at November 6, 2008 12:58 by eugegim

Initial Code
If not using the form_for/tabular_form_for to display errors - this is a way to cleanly display
the first error. Putting the li tags will make it appear like the standard rails form_for generated
error list.

<%= error_message_on(@account, "owner_id", "<li>", "</li>", "error_message") %>
# returns: <div class="error_message"><li>can't be blank</li></div>"

Initial URL

Initial Description

Initial Title
Error message like form_for

Initial Tags
textmate, error, rails

Initial Language