mirror of https://github.com/rails/rails
Tidy up generators based on latest change on AM.
This commit is contained in:
parent
3b4a13b7a9
commit
a12079df9f
|
@ -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"
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue