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.
54145e6e1c53c10a758c383bf1fa0b90?d=identicon&s=25 Mike C. (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.
7cde9debcc337d78ab60826b5527a812?d=identicon&s=25 David K. (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.