Name the method "validate", or call it from a "before_save"
and/or
"before_update" method.
On 2/14/06, John Kopanas <john@protoseinc.com>
wrote:>
> 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
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060214/713590f0/attachment.html