Forum: Ruby on Rails Rails 3 - Delayed_Job (collectiveidea), trying to Delay Mailers - Error: NoMethodError (undefined me

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.
4efd15a59825388ea3382ec4d482a7d8?d=identicon&s=25 CuriousNewbie (Guest)
on 2010-12-11 20:54
(Received via mailing list)
Hello, I have the following in an observer:

    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 this errors with:

NoMethodError (undefined method `delay' for UserMailer:Class):

Any ideas? thanks
This topic is locked and can not be replied to.