I use delayed_job gem here: https://github.com/collectiveidea/delayed_job
In an observer, I have the following:
UserMailer.delay.msg_notification(record)
In user_mailer.rb
class UserMailer < ActionMailer::Base ... def msg_notification(record) mail( :to => "#{record.user.email}", :subject => "Notification" ) end .. end
But these errors are with:
NoMethodError (undefined method `delay' for UserMailer:Class):
Any ideas? thanks
ruby-on-rails ruby-on-rails-3 delayed-job
Anapprentice
source share