aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/rails/generators
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/rails/generators')
-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