aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-13 13:50:40 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-13 13:56:08 +0200
commita12079df9f6fab7a491600219173c18e5166a7bb (patch)
treee164e4f9ecaf8e3e7c5d73af60f06ec9b7d11710
parent3b4a13b7a9e37100b68d5cfdbf1e31257cfdc85c (diff)
downloadrails-a12079df9f6fab7a491600219173c18e5166a7bb.tar.gz
rails-a12079df9f6fab7a491600219173c18e5166a7bb.tar.bz2
rails-a12079df9f6fab7a491600219173c18e5166a7bb.zip
Tidy up generators based on latest change on AM.
-rw-r--r--actionmailer/lib/rails/generators/mailer/templates/mailer.rb2
-rw-r--r--railties/lib/rails/generators.rb2
-rw-r--r--railties/test/generators/mailer_generator_test.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/actionmailer/lib/rails/generators/mailer/templates/mailer.rb b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
index 7343eb28b3..21e5918ecb 100644
--- a/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
+++ b/actionmailer/lib/rails/generators/mailer/templates/mailer.rb
@@ -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"
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index f4990bfb4c..41aecea355 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -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!
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb
index 850b45ff74..450dec7716 100644
--- a/railties/test/generators/mailer_generator_test.rb
+++ b/railties/test/generators/mailer_generator_test.rb
@@ -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