Are you checking the return code of save?
On 9/13/07, Shandy Nantz
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
>
> I have the following code:
>
> validates_format_of :password, :with => /^\w+$/, :message =>
''<b style > "color:red">Password must be
alphanumeric</b>'', :on => :save
>
> In order to get that message to display itself, do I have to say
> "object.save!" or will "object.save" also require that
I validate the
> password. The reason I ask, is that I am doing some updating on a
"User"
> object and instead of notifiying me when that there is a problem, the
> action simply does nothing and I am left wondering why the database
> wasn''t updated. Thanks for your help,
>
> -S
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---