Permalink
Browse files

Merge branch '3-1-stable' of https://github.com/rails/rails.git into …

…3-1-stable
  • Loading branch information...
2 parents 01dde6c + 9a6b96a commit 0bf4f370dd84194b401531f7342359b6124ac5e2 @jhtwong jhtwong committed Jul 21, 2011
@@ -383,7 +383,7 @@ def assign_nested_attributes_for_collection_association(association_name, attrib
attributes_collection = if keys.include?('id') || keys.include?(:id)
Array.wrap(attributes_collection)
else
- attributes_collection.sort_by { |i, _| i.to_i }.map { |_, attributes| attributes }
+ attributes_collection.values
end
end
@@ -755,6 +755,11 @@ def test_validate_presence_of_parent_fails_without_inverse_of
Interest.reflect_on_association(:man).options[:inverse_of] = :interests
end
+ def test_can_use_symbols_as_object_identifier
+ @pirate.attributes = { :parrots_attributes => { :foo => { :name => 'Lovely Day' }, :bar => { :name => 'Blown Away' } } }
+ assert_nothing_raised(NoMethodError) { @pirate.save! }
+ end
+
private
def association_setter

0 comments on commit 0bf4f37

Please sign in to comment.