Re: Update only selected columns

Erol Fornoles
Wed, 08 Oct 2008 01:23:50 -0000

On Oct 8, 5:04 am, Ian <ian.2...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
wrote:
> I''m working on an "update your profile" page.  One of
the fields is
> the user''s password.  I have a couple of validation rules set up
in
> the user model regarding the password''s minimum and maximum length
and
> it not being blank, etc.  They work great.  However, is there a way to
> turn them off and not update that column if the user does not enter
> anything in that field?

You could pass :unless if you''re using the validation helpers.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com