diff options
author | José Valim <jose.valim@gmail.com> | 2011-03-04 13:05:27 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-03-04 13:05:27 +0100 |
commit | f00a39845676bd552e31f47f3588ca266d4f010a (patch) | |
tree | cd211e83cc9973ef6cda7fa0c13c762b20ce4cee /railties/lib/rails/generators/actions.rb | |
parent | 1db4969dc9cabed9db162e7194b9353d43c967d7 (diff) | |
download | rails-f00a39845676bd552e31f47f3588ca266d4f010a.tar.gz rails-f00a39845676bd552e31f47f3588ca266d4f010a.tar.bz2 rails-f00a39845676bd552e31f47f3588ca266d4f010a.zip |
log and readme should respect --quiet
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 7 |
1 files changed, 4 insertions, 3 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 |