diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-17 18:09:13 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-17 18:43:40 +0100 |
commit | d0454e57661ceeaebd6f3fce4a608ec624257b19 (patch) | |
tree | ad40d90ac5ef91a167a4f24822650a05acb73431 /railties/lib/rails/generators/actions.rb | |
parent | e195b48f21bac800dbad5acc04ac732930d36c35 (diff) | |
download | rails-d0454e57661ceeaebd6f3fce4a608ec624257b19.tar.gz rails-d0454e57661ceeaebd6f3fce4a608ec624257b19.tar.bz2 rails-d0454e57661ceeaebd6f3fce4a608ec624257b19.zip |
Add readme as method in Rails::Generators::Actions (as we had in 2.3)
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index d41da773c6..e39fa3ff11 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -280,6 +280,16 @@ module Rails end end + # Reads the given file at the source root and prints it in the console. + # + # === Example + # + # readme "README" + # + def readme(path) + say File.read(find_in_source_paths(path)) + end + protected # Define log for backwards compatibility. If just one argument is sent, |