Module: Hancock::EmbeddedFindable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Models::Mongoid::EmbeddedElement
- Defined in:
- app/models/concerns/hancock/embedded_findable.rb
Overview
Helps to override find method in an embedded document. Usage :
- add to your model "include Hancock::EmbeddedFindable"
- override find method with:
def self.find(id)
find_through(Book, 'chapter', id)
end