diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-13 14:30:32 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-13 14:30:32 +0200 |
commit | d5225c1fd50a672d57ee30d3b107c2596318b02f (patch) | |
tree | 12f6f854f8c719d6d44378aace3503ee19001662 /railties/lib | |
parent | cd28dcb5a4ebfaf94e441c1325d8aa072d394bb9 (diff) | |
download | rails-d5225c1fd50a672d57ee30d3b107c2596318b02f.tar.gz rails-d5225c1fd50a672d57ee30d3b107c2596318b02f.tar.bz2 rails-d5225c1fd50a672d57ee30d3b107c2596318b02f.zip |
Do not require options on class_option.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/generators/base.rb b/railties/lib/generators/base.rb index 65bf74f12f..069c25f94a 100644 --- a/railties/lib/generators/base.rb +++ b/railties/lib/generators/base.rb @@ -187,7 +187,7 @@ module Rails # Make class option aware of Rails::Generators.options and Rails::Generators.aliases. # - def self.class_option(name, options) #:nodoc: + def self.class_option(name, options={}) #:nodoc: options[:desc] = "Indicates when to generate #{name.to_s.humanize.downcase}" unless options.key?(:desc) options[:aliases] = Rails::Generators.aliases[name] unless options.key?(:aliases) options[:default] = Rails::Generators.options[name] unless options.key?(:default) |