aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/mailer/mailer_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/generators/rails/mailer/mailer_generator.rb')
-rw-r--r--railties/lib/generators/rails/mailer/mailer_generator.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/lib/generators/rails/mailer/mailer_generator.rb b/railties/lib/generators/rails/mailer/mailer_generator.rb
new file mode 100644
index 0000000000..4c77df89ab
--- /dev/null
+++ b/railties/lib/generators/rails/mailer/mailer_generator.rb
@@ -0,0 +1,18 @@
+module Rails
+ module Generators
+ class MailerGenerator < NamedBase
+ argument :actions, :type => :array, :default => []
+
+ def check_class_collision
+ class_collisions class_name
+ end
+
+ def create_mailer_file
+ template "mailer.rb", File.join('app/models', class_path, "#{file_name}.rb")
+ end
+
+ add_and_invoke_template_engine_option!
+ add_and_invoke_test_framework_option!
+ end
+ end
+end