Forum: Ruby on Rails Additional Model Validation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John K. (Guest)
on 2006-02-14 23:14
(Received via mailing list)
I created a method to do additional validation on my model.  How can
I have that run whenever a model is being saved?  (For now I don't
want to extend AR.)

John K.

===================================================================== - source of the freshest software engineering
information on the net - software engineering conference
Dylan S. (Guest)
on 2006-02-14 23:17
(Received via mailing list)
Name the method "validate", or call it from a "before_save" and/or
"before_update" method.
This topic is locked and can not be replied to.