aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/rails
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2014-11-27 14:36:10 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2014-11-27 14:36:10 +0900
commitf9411b464dd477131540d32bed1fa8f18ef5ee4c (patch)
tree440fbda93e043a9ff652b487b1ae47a7c8b3bccf /actionmailer/lib/rails
parent37b1de18841adac1fb4940069389da628a835649 (diff)
downloadrails-f9411b464dd477131540d32bed1fa8f18ef5ee4c.tar.gz
rails-f9411b464dd477131540d32bed1fa8f18ef5ee4c.tar.bz2
rails-f9411b464dd477131540d32bed1fa8f18ef5ee4c.zip
Don't remove mailer layouts files
Diffstat (limited to 'actionmailer/lib/rails')
-rw-r--r--actionmailer/lib/rails/generators/mailer/mailer_generator.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionmailer/lib/rails/generators/mailer/mailer_generator.rb b/actionmailer/lib/rails/generators/mailer/mailer_generator.rb
index 094ec85114..83f8a67da7 100644
--- a/actionmailer/lib/rails/generators/mailer/mailer_generator.rb
+++ b/actionmailer/lib/rails/generators/mailer/mailer_generator.rb
@@ -8,7 +8,9 @@ module Rails
def create_mailer_file
template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
- template "application_mailer.rb", 'app/mailers/application_mailer.rb'
+ if self.behavior == :invoke
+ template "application_mailer.rb", 'app/mailers/application_mailer.rb'
+ end
end
hook_for :template_engine, :test_framework