aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-03-05 22:58:48 +0000
committerJon Leighton <j@jonathanleighton.com>2011-03-05 22:58:48 +0000
commit28ed10d3f27e27ed105dd8fd60d6151a6b372375 (patch)
treeca2cfb5696cbc9de3d636212374eaeafafa23c39 /railties/lib/rails/generators
parentb7f1b3641afe0ff4f3cd344815c6f7bb58821e9e (diff)
parent74818a35432b40fef16fe74f248ea75d35405324 (diff)
downloadrails-28ed10d3f27e27ed105dd8fd60d6151a6b372375.tar.gz
rails-28ed10d3f27e27ed105dd8fd60d6151a6b372375.tar.bz2
rails-28ed10d3f27e27ed105dd8fd60d6151a6b372375.zip
Merge branch 'master' into nested_has_many_through
Conflicts: activerecord/CHANGELOG
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r--railties/lib/rails/generators/actions.rb7
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb2
-rw-r--r--railties/lib/rails/generators/resource_helpers.rb2
3 files changed, 6 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index d7a86a5c40..c323df3e95 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -264,17 +264,18 @@ module Rails
# readme "README"
#
def readme(path)
- say File.read(find_in_source_paths(path))
+ log File.read(find_in_source_paths(path))
end
protected
# Define log for backwards compatibility. If just one argument is sent,
- # invoke say, otherwise invoke say_status.
+ # invoke say, otherwise invoke say_status. Differently from say and
+ # similarly to say_status, this method respects the quiet? option given.
#
def log(*args)
if args.size == 1
- say args.first.to_s
+ say args.first.to_s unless options.quiet?
else
args << (self.behavior == :invoke ? :green : :red)
say_status *args
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
index 791b901593..dcd3b276e3 100644
--- a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
+++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb
@@ -1,4 +1,4 @@
-# Configure Rails Envinronment
+# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb
index d6ccfc496a..de01c858dd 100644
--- a/railties/lib/rails/generators/resource_helpers.rb
+++ b/railties/lib/rails/generators/resource_helpers.rb
@@ -53,7 +53,7 @@ module Rails
@controller_i18n_scope ||= controller_file_path.gsub('/', '.')
end
- # Loads the ORM::Generators::ActiveModel class. This class is responsable
+ # Loads the ORM::Generators::ActiveModel class. This class is responsible
# to tell scaffold entities how to generate an specific method for the
# ORM. Check Rails::Generators::ActiveModel for more information.
def orm_class