Module: Stratify::MongoidExtension::NaturalKey::InstanceMethods
- Defined in:
- lib/stratify/mongoid_extension.rb
Instance Method Summary collapse
Instance Method Details
#natural_key_hash ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/stratify/mongoid_extension.rb', line 23 def natural_key_hash {}.tap do |hash| self.class.natural_key_fields.each do |field| hash[field] = self.send(field) end end end |