diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 17:37:52 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 17:37:52 +1100 |
commit | d64fbe634756ee9525b32a26a98cf0036758f11f (patch) | |
tree | cf71cd1a3c152c1c6d13497d409c99ff14945195 | |
parent | 33a5e8993bbe4e7835299c257e9bceffa5802e5b (diff) |
Temporary hack to disable mailer monkeypatch for overriding multipart mail templates in themes
-rw-r--r-- | app/models/application_mailer.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/models/application_mailer.rb b/app/models/application_mailer.rb index 859e8a0e2..84b045795 100644 --- a/app/models/application_mailer.rb +++ b/app/models/application_mailer.rb @@ -30,9 +30,11 @@ class ApplicationMailer < ActionMailer::Base # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" # method, for instance). - def initialize(method_name=nil, *parameters) #:nodoc: - create!(method_name, *parameters) if method_name - end + + # TEMPORARY: commented out method below while upgrading to Rails 3 + #def initialize(method_name=nil, *parameters) #:nodoc: + # create!(method_name, *parameters) if method_name + #end # For each multipart template (e.g. "the_template_file.text.html.erb") available, # add the one from the view path with the highest priority as a part to the mail @@ -68,7 +70,7 @@ class ApplicationMailer < ActionMailer::Base end # FIXME: This check was disabled temporarily during the Rails 3 upgrade - #if ActionMailer::VERSION::MAJOR == 2 + if ActionMailer::VERSION::MAJOR == 2 # This method is a customised version of ActionMailer::Base.create! # modified to allow templates to be selected correctly for multipart @@ -143,9 +145,9 @@ class ApplicationMailer < ActionMailer::Base # build the mail object itself @mail = create_mail end - # else - # raise "ApplicationMailer.create! is obsolete - find another way to ensure that themes can override mail templates for multipart mails" - # end + else + #raise "ApplicationMailer.create! is obsolete - find another way to ensure that themes can override mail templates for multipart mails" + end end |