Forum: Ruby on Rails email when validation fails

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.
Joe Van D. (Guest)
on 2006-06-09 19:36
(Received via mailing list)
Hi,

Say I want to send an email to someone every time a validation fails
in any model.  What would be the best way of doing that?

Thanks,
Joe
Alder G. (Guest)
on 2006-06-09 21:01
(Received via mailing list)
On 6/9/06, Joe Van D. <removed_email_address@domain.invalid> wrote:
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

A good old ActionMailer class. A good name for it would be
SystemNotifier.
Steven H. (Guest)
on 2006-06-09 21:37
(Received via mailing list)
I just set up something like this yesterday.  The RoR wiki has some
great examples of how to set up your mailer.
Roland M. (Guest)
on 2006-06-09 22:04
I think the valid? function is your answer.

http://api.rubyonrails.com/classes/ActiveRecord/Va...

Roland
This topic is locked and can not be replied to.