Skip to content

Commit

Permalink
some problems with transfer options
Browse files Browse the repository at this point in the history
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
  • Loading branch information
achempion committed Dec 29, 2012
1 parent e8bb7b3 commit c439ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simple_form/action_view_extensions/builder.rb
Expand Up @@ -194,7 +194,7 @@ def collection_check_boxes(attribute, collection, value_method, text_method, opt
# 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
Expand Down

0 comments on commit c439ab3

Please sign in to comment.