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

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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.