diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-25 12:57:58 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-25 12:57:58 +0200 |
commit | 6e6c0117b30226f031771acb9715318987067f51 (patch) | |
tree | 0561577a33b94e0245ee88ef56988eb8b638b4a1 /railties/lib/generators/rails/mailer/mailer_generator.rb | |
parent | ed33c29a4e2a07c2a738ec13775c5cc0d7867b50 (diff) | |
download | rails-6e6c0117b30226f031771acb9715318987067f51.tar.gz rails-6e6c0117b30226f031771acb9715318987067f51.tar.bz2 rails-6e6c0117b30226f031771acb9715318987067f51.zip |
Added Mailer generaator template engine and test framework agnostic.
Diffstat (limited to 'railties/lib/generators/rails/mailer/mailer_generator.rb')
-rw-r--r-- | railties/lib/generators/rails/mailer/mailer_generator.rb | 18 |
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 |