1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Do not require options on class_option.

This commit is contained in:
José Valim 2009-07-13 14:30:32 +02:00
parent cd28dcb5a4
commit d5225c1fd5

View file

@ -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)