Forum: Ruby on Rails how to use the new mailer inside a model

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.
Af25c598c54850cd55e07b1d060df9e1?d=identicon&s=25 Mike Chai (mlchai)
on 2010-12-30 01:22
(Received via mailing list)
I want to call the mailer from inside my model, but it gives me this
error:

uninitialized constant User::PasswordResetMailer

So I'm assuming that I have to include it somehow, but I'm not sure
how to do this. I've tried searching Google but I'm not getting any
helpful results.
6799ecb7745167d2590d85c4ed25d985?d=identicon&s=25 David Kahn (dkahn)
on 2010-12-30 04:09
(Received via mailing list)
On Wed, Dec 29, 2010 at 6:21 PM, Mike C <snibble@gmail.com> wrote:

> I want to call the mailer from inside my model, but it gives me this
> error:
>
> uninitialized constant User::PasswordResetMailer
>
> So I'm assuming that I have to include it somehow, but I'm not sure
> how to do this. I've tried searching Google but I'm not getting any
> helpful results.
>

It would help if you post the pertinent area of your model.
This topic is locked and can not be replied to.