[Rails] Overriding validation?

Calle Dybedahl
Tue, 23 May 2006 06:41:23 -0000

>>>>> "Steven" == Steven Rogers
<srogers1@austin.rr.com> writes:

> Is there a "normal" way to override the behavior of validator
methods
> (like validates_presence_of) for updates vs. creation?

Yes, you use the "on" option as described in the documentation. Or the
"if" option described in the same place, if your circumstances are
more complex than just create/update.
--
		     Calle Dybedahl <calle@cyberpomo.com>
		 http://www.livejournal.com/users/cdybedahl/
	"Just about anything can be done if you are demented enough."
		-- Christopher C. Petro, scary.devil.monastery