Forum: Ruby on Rails Additional Model Validation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9904f8acaf66a3c1a4b4434676be11cf?d=identicon&s=25 John Kopanas (Guest)
on 2006-02-14 22: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 Kopanas
http://www.kopanas.com


=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-02-14 22: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.