Tidy up generators based on latest change on AM.

This commit is contained in:
José Valim 2010-06-13 13:50:40 +02:00
parent 3b4a13b7a9
commit a12079df9f
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ class <%= class_name %> < ActionMailer::Base
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.actionmailer.<%= file_name %>.<%= action %>.subject
# en.<%= file_name %>.<%= action %>.subject
#
def <%= action %>
@greeting = "Hi"

View File

@ -327,7 +327,7 @@ module Rails
paths = []
namespaces.each do |namespace|
pieces = namespace.split(":")
paths << pieces.dup.push(pieces.last).join("/") unless pieces.uniq.size == 1
paths << pieces.dup.push(pieces.last).join("/")
paths << pieces.join("/")
end
paths.uniq!

View File

@ -17,8 +17,8 @@ class MailerGeneratorTest < Rails::Generators::TestCase
def test_mailer_with_i18n_helper
run_generator
assert_file "app/mailers/notifier.rb" do |mailer|
assert_match /en\.actionmailer\.notifier\.foo\.subject/, mailer
assert_match /en\.actionmailer\.notifier\.bar\.subject/, mailer
assert_match /en\.notifier\.foo\.subject/, mailer
assert_match /en\.notifier\.bar\.subject/, mailer
end
end