Created
April 22, 2011 23:55
-
-
Save phlegx/937973 to your computer and use it in GitHub Desktop.
resque mailer error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username:14741 on mailer at 2011/04/23 01:52:26just now | |
Retry or Remove | |
Class | |
CustomerMailer | |
Arguments | |
"customer_enabled" | |
{"customer"=>{"created_at"=>"2011-04-22T02:50:44+02:00", "disable"=>false, "id"=>10, "name"=>"M", "restored_at"=>nil, "token"=>"kommer", "updated_at"=>"2011-04-23T01:52:22+02:00"}} | |
nil | |
nil | |
Exception | |
NoMethodError | |
Error | |
undefined method `customer_setting' for #<Hash:0x0000000734db98> | |
/home/username/workspace/projectx/app/mailers/customer_mailer.rb:28:in `customer_enabled' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:151:in `process_action' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:120:in `process' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionpack-3.0.3/lib/abstract_controller/rendering.rb:40:in `process' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionmailer-3.0.3/lib/action_mailer/old_api.rb:75:in `process' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionmailer-3.0.3/lib/action_mailer/base.rb:446:in `process' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/actionmailer-3.0.3/lib/action_mailer/base.rb:441:in `initialize' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:16:in `new' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:16:in `deliver!' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:37:in `perform' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/job.rb:127:in `perform' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/worker.rb:163:in `perform' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/worker.rb:130:in `block in work' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/worker.rb:116:in `loop' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/worker.rb:116:in `work' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@projectx_3.0.3/gems/resque-1.15.0/lib/resque/tasks.rb:27:in `block (2 levels) in <top (required)>' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:636:in `call' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:631:in `each' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:631:in `execute' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain' | |
/home/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2029:in `each' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/lib/rake.rb:1998:in `run' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.8.7/bin/rake:31:in `<top (required)>' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/bin/rake:19:in `load' | |
/home/username/.rvm/gems/ruby-1.9.2-p180@global/bin/rake:19:in `<main>' | |
## customer_mailer.rb | |
class CustomerMailer < ActionMailer::Base | |
include Resque::Mailer | |
default :from => APP_CONFIG['mail']['mail_sender'] | |
# Send information email if a customer was disabled. | |
def customer_disabled(customer, account, email) | |
unless account.nil? | |
set_locale account.language.iso_code.to_s | |
@account = account | |
to_name = account.profile.full_name | |
else | |
set_locale customer.customer_setting.language.iso_code.to_s | |
@customer = customer | |
to_name = customer.customer_profile.full_name | |
end | |
mail(:to => "#{to_name} <#{email}>", :subject => t('mailers.customer_mailer.customer_disabled.subject')) | |
end | |
# Send information email if a customer was re-enabled. | |
def customer_enabled(customer, account, email) | |
unless account.nil? | |
set_locale account.language.iso_code.to_s | |
@account = account | |
to_name = account.profile.full_name | |
else | |
set_locale customer.customer_setting.language.iso_code.to_s | |
@customer = customer | |
to_name = customer.customer_profile.full_name | |
end | |
mail(:to => "#{to_name} <#{email}>", :subject => t('mailers.customer_mailer.customer_disabled.subject')) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment