Options should be always a hash

This commit is contained in:
Rafael Mendonça França 2014-03-11 10:30:30 -03:00
parent 645988a855
commit 6976fba033
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ module SimpleForm
@components = []
end
def use(name, options=nil, &block)
def use(name, options={}, &block)
if options && wrapper = options[:wrap_with]
@components << Single.new(name, wrapper, options.except(:wrap_with))
else
@ -53,7 +53,7 @@ module SimpleForm
end
end
def optional(name, options=nil, &block)
def optional(name, options={}, &block)
@options[name] = false
use(name, options, &block)
end