diff options
author | Rajinder Yadav <devguy.ca@gmail.com> | 2010-10-15 22:19:39 -0400 |
---|---|---|
committer | Rajinder Yadav <devguy.ca@gmail.com> | 2010-10-15 22:19:39 -0400 |
commit | 62eb00a62e3868c3500372def52968b919332b51 (patch) | |
tree | 8497f517402c19eae1fea22943565cbf11496ef7 /actionmailer/lib/action_mailer | |
parent | 018bf0f5756ef3887815ea46d6671dc1d3b526cf (diff) | |
parent | cffae06a4f1b7aac86a7e99cfb244890f837f976 (diff) | |
download | rails-62eb00a62e3868c3500372def52968b919332b51.tar.gz rails-62eb00a62e3868c3500372def52968b919332b51.tar.bz2 rails-62eb00a62e3868c3500372def52968b919332b51.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 9 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/old_api.rb | 4 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 6 |
3 files changed, 8 insertions, 11 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6ae3940e6d..0bf60a2c24 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -409,7 +409,7 @@ module ActionMailer #:nodoc: protected def set_payload_for_mail(payload, mail) #:nodoc: - payload[:mailer] = self.name + payload[:mailer] = name payload[:message_id] = mail.message_id payload[:subject] = mail.subject payload[:to] = mail.to @@ -421,11 +421,8 @@ module ActionMailer #:nodoc: end def method_missing(method, *args) #:nodoc: - if action_methods.include?(method.to_s) - new(method, *args).message - else - super - end + return super unless respond_to?(method) + new(method, *args).message end end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index b8c15df263..0396f0775e 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -247,8 +247,8 @@ module ActionMailer [ nil, {} ] else ctype, *attrs = @content_type.split(/;\s*/) - attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } - [ctype, {"charset" => @charset}.merge(attrs)] + attrs = Hash[attrs.map { |attr| attr.split(/\=/, 2) }] + [ctype, {"charset" => @charset}.merge!(attrs)] end end end diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 86136bdafd..d67a5b6521 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -14,9 +14,9 @@ module ActionMailer paths = app.config.paths options = app.config.action_mailer - options.assets_dir ||= paths.public.to_a.first - options.javascripts_dir ||= paths.public.javascripts.to_a.first - options.stylesheets_dir ||= paths.public.stylesheets.to_a.first + options.assets_dir ||= paths["public"].first + options.javascripts_dir ||= paths["public/javascripts"].first + options.stylesheets_dir ||= paths["public/stylesheets"].first # make sure readers methods get compiled options.asset_path ||= nil |