Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Flatten only 1 level deep when passing to fields_for. Fixes #786. #792

Merged
merged 1 commit into from

2 participants

eLod Justin French
eLod

All tests are green (for all rails versions).

Justin French justinfrench merged commit 65ccfbd into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/formtastic/helpers/inputs_helper.rb
2  lib/formtastic/helpers/inputs_helper.rb
View
@@ -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
Something went wrong with that request. Please try again.