Method: Mongoid::Indexable::ClassMethods#index_specification
- Defined in:
- lib/mongoid/indexable.rb
#index_specification(index_hash, index_name = nil) ⇒ Specification
Get an index specification for the provided key.
118 119 120 121 122 |
# File 'lib/mongoid/indexable.rb', line 118 def index_specification(index_hash, index_name = nil) index_specifications.detect do |spec| spec.superficial_match?(key: index_hash, name: index_name) end end |