I am starting to play with validations as I want to catch errors before
SQL rejects inserts to the table which are ugly when nulls are sent to
‘Not Null’ columns, etc.
If I do something in my model like…
:with => /^\w+$/,
:message => “you moron, enter a name”
I still end up getting the trace window and not the output in the form
itself where I would expect it to display with a first line that reads:
<%= error_messages_for ‘client’ %>
From Agile book and from rails.rubyonrails.com, I can see that I can use
rescue_action_in_public(exception) but that seems to be for trapping
against not found pages.
How do I capture these errors and stay within my form and display my