Hi all:
I user the command : ruby script/generate mailer FinanceMailer
alert_customer_balance, then ,i have this files:
class FinanceMailer < ActionMailer::Base
def alert_customer_balance(sent_at = Time.now)
@subject = ‘FinanceMailer#alert_customer_balance’
@body = {}
@recipients = ‘[email protected]’
@from = ‘[email protected]’
@sent_on = sent_at
@headers = {}
end
end
After this ,i start ruby with: ruby script/consolee$B!#e(B at this
consoel
enviroment, i put “FinanceMailer.alert_customer_balance”, But system
return :
NoMethodError: undefined method `alert_customer_balance’ for
FinanceMailer:Class
from c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.5/lib/
action_mailer
/base.rb:335:in `method_missing’
from (irb):13
I think maybe some inint method error?