Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
fixed: test: Tree should delete child. (TestMongoidActsAsTree):
Browse files Browse the repository at this point in the history
NoMethodError: undefined method 'parent_id_field' for BSON::ObjectID
  • Loading branch information
saberma authored and saks committed Aug 11, 2010
1 parent a959e38 commit 283bd0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid_acts_as_tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def build(attributes)
#To delete object use <tt>object.destroy</tt>.
def delete(object_or_id)
object = case object_or_id
when String
when String, BSON::ObjectID
@parent.class.find object_or_id
else
object_or_id
Expand Down

0 comments on commit 283bd0b

Please sign in to comment.