Module: Mongoid::Selectable
Overview
Provides behaviour for generating the selector for a specific document.
Instance Method Summary collapse
-
#atomic_selector ⇒ Hash
Get the atomic selector for the document.
Instance Method Details
#atomic_selector ⇒ Hash
Get the atomic selector for the document. This is a hash in the simplest case { “_id” => id }, but can become more complex for embedded documents and documents that use a shard key.
20 21 22 23 |
# File 'lib/mongoid/selectable.rb', line 20 def atomic_selector @atomic_selector ||= ( ? : root_atomic_selector) end |