diff options
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index d41da773c6..7dec4d446a 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -89,12 +89,12 @@ module Rails # # ==== Example # - # source "http://gems.github.com/" + # add_source "http://gems.github.com/" def add_source(source, options={}) log :source, source in_root do - prepend_file "Gemfile", "source #{source.inspect}", :verbose => false + prepend_file "Gemfile", "source #{source.inspect}\n", :verbose => false end end @@ -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, |