engine/lib/locomotive/mongoid/patches.rb

18 lines
359 B
Ruby
Raw Normal View History

require 'mongoid'
2010-04-25 00:33:38 +00:00
## various patches
module Mongoid #:nodoc:
module Document
def update_child_with_noname(child, clear = false)
name = child.association_name
return if name.blank? # fix a weird bug with mongoid-acts-as-tree
update_child_without_noname(child, clear)
end
alias_method_chain :update_child, :noname
end
end