aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/mailer/mailer_generator.rb
blob: 4c77df89ab1cec2ad90a3256db79a1a18d299631 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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