2010-06-03 20:20:53 +00:00
|
|
|
require 'mongoid'
|
|
|
|
|
2010-04-25 00:33:38 +00:00
|
|
|
## various patches
|
|
|
|
module Mongoid #:nodoc:
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-06-10 22:07:59 +00:00
|
|
|
module Document
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-20 10:15:53 +00:00
|
|
|
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)
|
2010-06-10 22:07:59 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-20 10:15:53 +00:00
|
|
|
alias_method_chain :update_child, :noname
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-20 10:15:53 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|