diff options
Diffstat (limited to 'railties')
5 files changed, 3 insertions, 47 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index 438c976b35..8a8143e00e 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -10,4 +10,4 @@ require 'rubygems' if ARGV.include?("--dev") require 'rails/generators' require 'rails/generators/rails/app/app_generator' -Rails::Generators::AppGenerator.start
\ No newline at end of file +Rails::Generators::AppGenerator.start diff --git a/railties/lib/rails/generators/rails/mailer/USAGE b/railties/lib/rails/generators/rails/mailer/USAGE deleted file mode 100644 index a08d459739..0000000000 --- a/railties/lib/rails/generators/rails/mailer/USAGE +++ /dev/null @@ -1,15 +0,0 @@ -Description: - Stubs out a new mailer and its views. Pass the mailer name, either - CamelCased or under_scored, and an optional list of emails as arguments. - - This generates a mailer class in app/mailers and invokes your template - engine and test framework generators. - -Example: - `rails generate mailer Notifications signup forgot_password invoice` - - creates a Notifications mailer class, views, test, and fixtures: - Mailer: app/mailers/notifications.rb - Views: app/views/notifications/signup.erb [...] - Test: test/functional/notifications_test.rb - Fixtures: test/fixtures/notifications/signup [...] diff --git a/railties/lib/rails/generators/rails/mailer/mailer_generator.rb b/railties/lib/rails/generators/rails/mailer/mailer_generator.rb deleted file mode 100644 index 8993181d79..0000000000 --- a/railties/lib/rails/generators/rails/mailer/mailer_generator.rb +++ /dev/null @@ -1,14 +0,0 @@ -module Rails - module Generators - class MailerGenerator < NamedBase - 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") - end - - hook_for :template_engine, :test_framework - end - end -end diff --git a/railties/lib/rails/generators/rails/mailer/templates/mailer.rb b/railties/lib/rails/generators/rails/mailer/templates/mailer.rb deleted file mode 100644 index 7343eb28b3..0000000000 --- a/railties/lib/rails/generators/rails/mailer/templates/mailer.rb +++ /dev/null @@ -1,16 +0,0 @@ -class <%= class_name %> < ActionMailer::Base - default :from => "from@example.com" -<% for action in actions -%> - - # Subject can be set in your I18n file at config/locales/en.yml - # with the following lookup: - # - # en.actionmailer.<%= file_name %>.<%= action %>.subject - # - def <%= action %> - @greeting = "Hi" - - mail :to => "to@example.org" - end -<% end -%> -end diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 81d6afa221..298c45b6ac 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -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 |