Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested fields_for when Hash-based model is passed. #1778

Merged
merged 2 commits into from Jun 22, 2011

Conversation

spohlenz
Copy link
Contributor

This fixes an error when a record object that is a subclass of Hash is passed to fields_for, which is incorrectly interpreted as field options.

This fixes an error when a record object that is a subclass of Hash is
passed to fields_for, which is incorrectly interpreted as field options.
@@ -1689,6 +1689,24 @@ class FormHelperTest < ActionView::TestCase
assert_dom_equal expected, output_buffer
end

def test_nested_fields_for_with_hash_like_model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not a use a hash in the test?

@spohlenz
Copy link
Contributor Author

I've updated the test to use a real hash-based model rather than a stubbed out one.

josevalim added a commit that referenced this pull request Jun 22, 2011
Fix nested fields_for when Hash-based model is passed.
@josevalim josevalim merged commit 3c8c379 into rails:master Jun 22, 2011
spastorino added a commit that referenced this pull request Jul 6, 2011
Backport of #1778 (fix nested fields_for when Hash-based model is passed)
sterrym pushed a commit to sterrym/formtastic that referenced this pull request Jan 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants