Skip to content
Browse files

Merge pull request #792 from eLod/issue-786

Flatten only 1 level deep when passing to fields_for. Fixes #786.
  • Loading branch information...
2 parents 6bbec6c + beee0a2 commit 65ccfbd2f4fb251d9053c2df3207985829496e11 @justinfrench committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/formtastic/helpers/inputs_helper.rb
View
2 lib/formtastic/helpers/inputs_helper.rb
@@ -380,7 +380,7 @@ def inputs_for_nested_attributes(*args, &block) #:nodoc:
end
end
- fields_for_args = [options.delete(:for), options.delete(:for_options) || {}].flatten
+ fields_for_args = [options.delete(:for), options.delete(:for_options) || {}].flatten(1)
fields_for(*fields_for_args, &fields_for_block)
end

0 comments on commit 65ccfbd

Please sign in to comment.
Something went wrong with that request. Please try again.