diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-03-11 22:07:48 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-03-11 22:07:48 +1100 |
commit | 965fe59bff249ad91131a444e1fbd63dc4411db3 (patch) | |
tree | ec2d54d5eaad9e32bce1758e6a67c364279bbd39 /railties/lib/rails/generators/base.rb | |
parent | 79f02a473cb6aef00003745f23802314c8c89e7d (diff) | |
parent | 4adcbb6b2d6cef49ac28df4254ac74e09f14dcf7 (diff) | |
download | rails-965fe59bff249ad91131a444e1fbd63dc4411db3.tar.gz rails-965fe59bff249ad91131a444e1fbd63dc4411db3.tar.bz2 rails-965fe59bff249ad91131a444e1fbd63dc4411db3.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index dfa0d573c9..9624c35c0b 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -62,7 +62,7 @@ module Rails # # For example, if the user invoke the controller generator as: # - # ruby script/generate controller Account --test-framework=test_unit + # rails generate controller Account --test-framework=test_unit # # The controller generator will then try to invoke the following generators: # @@ -117,11 +117,11 @@ module Rails # All hooks come with switches for user interface. If the user don't want # to use any test framework, he can do: # - # ruby script/generate controller Account --skip-test-framework + # rails generate controller Account --skip-test-framework # # Or similarly: # - # ruby script/generate controller Account --no-test-framework + # rails generate controller Account --no-test-framework # # ==== Boolean hooks # @@ -133,7 +133,7 @@ module Rails # # Then, if you want, webrat to be invoked, just supply: # - # ruby script/generate controller Account --webrat + # rails generate controller Account --webrat # # The hooks lookup is similar as above: # @@ -213,8 +213,7 @@ module Rails if base.name && base.name !~ /Base$/ Rails::Generators.subclasses << base - if defined?(Rails.root) && Rails.root - path = File.expand_path(File.join(Rails.root, 'lib', 'templates')) + Rails::Generators.templates_path.each do |path| if base.name.include?('::') base.source_paths << File.join(path, base.base_name, base.generator_name) else |