Module: Mongoid::Locking::Persistable::Creatable
- Included in:
- Mongoid::Locking::Persistable
- Defined in:
- lib/mongoid/locking/persistable/creatable.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#insert_as_embedded ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mongoid/locking/persistable/creatable.rb', line 5 def raise Errors::NoParent, self.class.name unless _parent if _parent.new_record? _parent.insert else selector = _parent.atomic_selector _update_one_locked(_root.collection, selector, positionally(selector, atomic_inserts)) end end |