class Rails::Generators::MailerGenerator - actionmailer-4.2.4 Documentation

# class Rails::Generators::MailerGenerator

### Public Instance Methods

create_mailer_file() click to toggle source

    # File lib/rails/generators/mailer/mailer_generator.rb, line 9
    def create_mailer_file
      template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
      if self.behavior == :invoke
        template "application_mailer.rb", 'app/mailers/application_mailer.rb'
      end
    end