fnando/notifier

Conflict with ActionMailer notifier.rb

Closed this issue · 2 comments

From what I can tell this directly conflicts with Rails' default method for sending emails: http://api.rubyonrails.org/classes/ActionMailer/Base.html

As long as I have a notifier.rb file in my models folder autotest will not run.

I don't know that there's any way around it, but since I've been having problems with this and haven't found anything similar on google I figured I should make a note of it. It crashes with the following error:

/Users/joeunrue/Rails/myapp/app/models/notifier.rb:1:in `<top (required)>': Notifier is not a class (TypeError)

The error goes away and growl notifications work when I delete my notifier.rb file, which is not something I'm sure I'm willing to do.

Actually, This isn't conflicting with Rails/ActionMailer. Is because you have a class called Notifier.
The notifier gem implements this as a module and hence the conflict (TypeError exception).

For now, you can rename your mailer to something like Mailer or AppNotifier.

Nando Vieira
http://nandovieira.com.br

On Mar 3, 2012, at 10:05 PM, Saxon Unrue wrote:

From what I can tell this directly conflicts with Rails' default method for sending emails: http://api.rubyonrails.org/classes/ActionMailer/Base.html

As long as I have a notifier.rb file in my models folder autotest will not run.

I don't know that there's any way around it, but since I've been having problems with this and haven't found anything similar on google I figured I should make a note of it. It crashes with the following error:

/Users/joeunrue/Rails/myapp/app/models/notifier.rb:1:in `<top (required)>': Notifier is not a class (TypeError)

The error goes away and growl notifications work when I delete my notifier.rb file, which is not something I'm sure I'm willing to do.


Reply to this email directly or view it on GitHub:
#6

Hey, thanks for the quick response. I didn't mean that it was a conflict with ActionMailer, but with their API example (which I've been using for three years). I mostly wanted to make sure I was correct in figuring out my conflict, since I wasn't able to find any other example of it on Google.