I’m baffled but this error:
NoMethodError: undefined method application_accepted' for UserMailer:Class from c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer /base.rb:385:in
method_missing’
from D:/rails/app/models/applicant_observer.rb:11:in after_ save' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record /observer.rb:171:in
send’
from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record
/observer.rb:171:in update' from c:/ruby/lib/ruby/1.8/observer.rb:185:in
notify_observers’
from c:/ruby/lib/ruby/1.8/observer.rb:184:in each' from c:/ruby/lib/ruby/1.8/observer.rb:184:in
notify_observers’
here is the class in question
require ‘action_mailer/ar_mailer’
class UserMailer < ActionMailer::ARMailer
def signup_notification(user)
setup_email(user)
@subject += ‘Welcome to’
end
def application_accepted(application)
setup_email(application.position.account)
@subject += “#{application.name} accepted.”
@body[:application] = application
end
protected
def setup_email(user)
recipients “#{user.email}”
from FROM_MAILER_STRING # Sets the User FROM Name and Email
subject “”
body :user => user
sent_on Time.now
end
end
end
signup_notification works fine why would this other method?
Thanks,
GP