kron DEV pyramid2 master cat lib action_mailer quoting rb module Actio

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[kron ~/DEV/pyramid2(master)]$ cat lib/action_mailer/quoting.rb
module ActionMailer
module Quoting
module_eval do
include Pyramid2::ActionMailer::Quoting
end
end
end
[kron ~/DEV/pyramid2(master)]$ cat lib/pyramid2/action_mailer/quoting.rb
module Pyramid2
module ActionMailer
module Quoting
def quote_address_if_necessary(address, charset)
if Array === address
address.map { |a| quote_address_if_necessary(a, charset) }
elsif address =~ /^(\S.*)\s+(<.*>)$/
address = $2
phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset)
"#{phrase} #{address}"
else
address
end
end
end
end
end
NoMethodError (undefined method `quote_any_if_necessary' for #<UserMailer:0x7f67b6837668>):
app/models/user_observer.rb:3:in `after_create'
/usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'
/usr/lib/ruby/1.8/observer.rb:184:in `each'
/usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'
app/controllers/users_controller.rb:21:in `create'