2009-06-25 06:57:58 -04:00
|
|
|
module Rails
|
|
|
|
module Generators
|
|
|
|
class MailerGenerator < NamedBase
|
2010-04-30 06:42:12 -04:00
|
|
|
source_root File.expand_path("../templates", __FILE__)
|
|
|
|
|
2009-06-25 11:34:09 -04:00
|
|
|
argument :actions, :type => :array, :default => [], :banner => "method method"
|
2009-06-26 04:40:02 -04:00
|
|
|
check_class_collision
|
2009-06-25 06:57:58 -04:00
|
|
|
|
|
|
|
def create_mailer_file
|
2010-01-18 18:49:04 -05:00
|
|
|
template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb")
|
2009-06-25 06:57:58 -04:00
|
|
|
end
|
|
|
|
|
2009-06-27 08:27:26 -04:00
|
|
|
hook_for :template_engine, :test_framework
|
2009-06-25 06:57:58 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|