[Rails] Overriding validation?

Steven Rogers
Tue, 23 May 2006 06:36:24 -0000

Is there a "normal" way to override the behavior of validator methods
(like validates_presence_of) for updates vs. creation?  For example,
in the AWDR example store program, the User class validates the
presence of the password and its length - which makes sense when the
user entry is created. But what if you wanted to provide an update
form that updates just certain items without validators (say, a
customer email address) while leaving the password unchanged ?
Cutting around update_attributes seems like a hack, so wondering if
there''s a typical way to handle this.

Thanks,
SR