aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/erb/mailer/mailer_generator.rb
blob: 9b615d66080ff19874e9c583ed2b557d6846180c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Erb
  module Generators
    class MailerGenerator < Base
      argument :actions, :type => :array, :default => []

      def create_view_files
        actions.each do |action|
          @action, @path = action, File.join(file_path, action)
          template "view.erb", File.join("app", "views", "#{@path}.erb")
        end
      end
    end
  end
end