Skip to content

Commit

Permalink
Revert "Allowed Parent#update_attributes(:child => { :child_attribute…
Browse files Browse the repository at this point in the history
… => value"

Had spec failures after commit.

This reverts commit 523c44d.
  • Loading branch information
durran committed Jun 19, 2010
1 parent 523c44d commit 79b4d37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 77 deletions.
10 changes: 1 addition & 9 deletions lib/mongoid/attributes.rb
Expand Up @@ -38,15 +38,7 @@ def process(attrs = nil)
if set_allowed?(key)
write_attribute(key, value)
elsif write_allowed?(key)
if associations.include?(key.to_s) and associations[key.to_s].embedded? and value.is_a?(Hash)
if association = send(key)
association.nested_build(value)
else
send("build_#{key}", value)
end
else
send("#{key}=", value)
end
send("#{key}=", value)
end
end
setup_modifications
Expand Down
68 changes: 0 additions & 68 deletions spec/integration/mongoid/association_attributes_spec.rb

This file was deleted.

0 comments on commit 79b4d37

Please sign in to comment.