Permalink
Browse files

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
  • Loading branch information...
1 parent e8bb7b3 commit c439ab33c82e831fab941c7c43ee51ff334c1514 @achempion achempion committed Dec 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/simple_form/action_view_extensions/builder.rb
@@ -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

0 comments on commit c439ab3

Please sign in to comment.