aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/generators/mailer_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/lib/generators/mailer_generator.rb')
-rw-r--r--actionmailer/lib/generators/mailer_generator.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionmailer/lib/generators/mailer_generator.rb b/actionmailer/lib/generators/mailer_generator.rb
new file mode 100644
index 0000000000..d3048c3168
--- /dev/null
+++ b/actionmailer/lib/generators/mailer_generator.rb
@@ -0,0 +1,18 @@
+module Rails
+ module Generators
+ class MailerGenerator < NamedBase
+ argument :actions, :type => :array, :default => [], :banner => "method method"
+ check_class_collision
+
+ def self.source_root
+ File.expand_path("../mailer/templates", __FILE__)
+ end
+
+ def create_mailer_file
+ template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
+ end
+
+ hook_for :template_engine, :test_framework
+ end
+ end
+end