Move ActionMailer generator to AM

This commit is contained in:
Carlhuda 2010-04-29 16:45:45 -07:00
parent b0a53c86ef
commit c54c84b7b4
5 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,10 @@ module Rails
argument :actions, :type => :array, :default => [], :banner => "method method"
check_class_collision
def self.source_root
File.expand_path("../mailer/templates", __FILE__)
end
def create_mailer_file
template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
end

View File

@ -10,4 +10,4 @@ require 'rubygems' if ARGV.include?("--dev")
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
Rails::Generators::AppGenerator.start
Rails::Generators::AppGenerator.start

View File

@ -1,5 +1,6 @@
require 'generators/generators_test_helper'
require 'rails/generators/rails/mailer/mailer_generator'
require 'generators/mailer_generator'
class MailerGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper