aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/rails_generator/options.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index cecbdad57c..8b9fdddda7 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Generator::Base#usage takes an optional message argument which defaults to Generator::Base#usage_message. [Jeremy Kemper]
+
* Remove the extraneous AR::Base.threaded_connections setting from the webrick server. [Jeremy Kemper]
* Add integration test support to app generation and testing [Jamis Buck]
diff --git a/railties/lib/rails_generator/options.rb b/railties/lib/rails_generator/options.rb
index df9737f13f..fe80f8340d 100644
--- a/railties/lib/rails_generator/options.rb
+++ b/railties/lib/rails_generator/options.rb
@@ -96,8 +96,8 @@ module Rails
# Raise a usage error. Override usage_message to provide a blurb
# after the option parser summary.
- def usage
- raise UsageError, "#{@option_parser}\n#{usage_message}"
+ def usage(message = usage_message)
+ raise UsageError, "#{@option_parser}\n#{message}"
end
def usage_message