some problems with transfer options

simple_fields_for don't passed options and it's created some problems like this:
ryanb/nested_form#219
ryanb/nested_form#226

because if wrapper option is false, then wrapper not transfered
This commit is contained in:
Boris Kuznetsov 2012-12-29 19:32:45 +04:00
parent e8bb7b391b
commit c439ab33c8
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ module SimpleForm
# end
def simple_fields_for(*args, &block)
options = args.extract_options!
options[:wrapper] ||= self.options[:wrapper]
options[:wrapper] = self.options[:wrapper] if options[:wrapper].nil?
options[:defaults] ||= self.options[:defaults]
if self.class < ActionView::Helpers::FormBuilder