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.
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-06-09 17: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
B780ee0ee1480454a85df58536702f63?d=identicon&s=25 Alder Green (Guest)
on 2006-06-09 19:01
(Received via mailing list)
On 6/9/06, Joe Van Dyk <joevandyk@gmail.com> wrote:
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

A good old ActionMailer class. A good name for it would be
SystemNotifier.
4034df6027cbecf3f4a19a711a248536?d=identicon&s=25 Steven Hansen (rooster)
on 2006-06-09 19: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.
A0fdde9231afc79ff35cb186690d087c?d=identicon&s=25 Roland Mai (roland)
on 2006-06-09 20: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.