zapnap/resque_mailer — Issue #25: undefined method `perform' issue
Author: coorasse
Created: 2012-03-04 15:05:05+00:00
State: open

I can't get this to work.

That's my CronMailer class

class CronMailer < ActionMailer::Base
include Resque::Mailer
def notification_email(alert_id)
alert = UserAlert.find(alert_id)
recipients alert.user.email
from "myaddress@xx"
subject "Alert"
body alert.notification.message
end
end

I call it with:
CronMailer.notification_email(alert.id).deliver

and I always see this in admin console:
Class CronMailer
Arguments "notification_email"
108
Exception NoMethodError
Error undefined method 'perform' for CronMailer:Class
/var/lib/gems/1.9.1/gems/actionmailer-3.1.0/lib/action_mailer/base.rb:455:in 'method_missing'