diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
commit | 9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch) | |
tree | 74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /railties/lib/rails/generators/base.rb | |
parent | aff821508a16245ebc03510ba29c70379718dfb7 (diff) | |
parent | 5214e73850916de3c9127d35a4ecee0424d364a3 (diff) | |
download | rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2 rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip |
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index fdfceb14ce..dfecd2a6e4 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -3,7 +3,7 @@ begin rescue LoadError puts "Thor is not available.\nIf you ran this command from a git checkout " \ "of Rails, please make sure thor is installed,\nand run this command " \ - "as `ruby #{$0} #{ARGV.join(" ")} --dev`" + "as `ruby #{$0} #{(ARGV | ['--dev']).join(" ")}`" exit end @@ -81,7 +81,7 @@ module Rails # guessed based on class invokes hook_for, as noticed in the example above. # This can be customized with two options: :base and :as. # - # Let's suppose you are creating a generator that needs to invoke the + # Let's suppose you are creating a generator that needs to invoke the # controller generator from test unit. Your first attempt is: # # class AwesomeGenerator < Rails::Generators::Base @@ -274,7 +274,7 @@ module Rails # Use Rails default banner. # def self.banner - "rails generate #{generator_name} #{self.arguments.map{ |a| a.usage }.join(' ')} [options]" + "rails generate #{namespace.sub(/^rails:/,'')} #{self.arguments.map{ |a| a.usage }.join(' ')} [options]".gsub(/\s+/, ' ') end # Sets the base_name taking into account the current class namespace. |