Sha256: 63baeaa7e5c3baafc8fc6e4fe7873ce0face6d638f26a34130c47a3246a6ea56

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

module Rails
  module Generators
    class MailerGenerator < NamedBase
      source_root File.expand_path("../templates", __FILE__)

      argument :actions, type: :array, default: [], banner: "method method"
      check_class_collision

      def create_mailer_file
        template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
        template "application_mailer.rb", 'app/mailers/application_mailer.rb'
      end

      hook_for :template_engine, :test_framework
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
actionmailer-4.2.0.rc1 lib/rails/generators/mailer/mailer_generator.rb