diff options
Diffstat (limited to 'railties/lib/generators/erb/mailer/mailer_generator.rb')
-rw-r--r-- | railties/lib/generators/erb/mailer/mailer_generator.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/railties/lib/generators/erb/mailer/mailer_generator.rb b/railties/lib/generators/erb/mailer/mailer_generator.rb index 408c942cef..65fa4a86c5 100644 --- a/railties/lib/generators/erb/mailer/mailer_generator.rb +++ b/railties/lib/generators/erb/mailer/mailer_generator.rb @@ -1,19 +1,12 @@ -require 'generators/erb' +require 'generators/erb/controller/controller_generator' module Erb module Generators - class MailerGenerator < Base - argument :actions, :type => :array, :default => [], :banner => "method method" + class MailerGenerator < ControllerGenerator + protected - def create_view_folder - empty_directory File.join("app/views", file_path) - end - - def create_view_files - actions.each do |action| - @action, @path = action, File.join(file_path, action) - template "view.text.erb", File.join("app/views", "#{@path}.text.erb") - end + def format + :text end end end |