Module: Mongoid::Lookup::Collection::ClassMethods
- Defined in:
- lib/mongoid_lookup/collection.rb
Instance Method Summary collapse
-
#build_lookup_collection ⇒ Object
configure the lookup collection.
-
#relate_lookup_collection ⇒ Object
add polymorphic relation to referenced document.
Instance Method Details
#build_lookup_collection ⇒ Object
configure the lookup collection
11 12 13 |
# File 'lib/mongoid_lookup/collection.rb', line 11 def build_lookup_collection relate_lookup_collection end |
#relate_lookup_collection ⇒ Object
add polymorphic relation to referenced document
18 19 20 |
# File 'lib/mongoid_lookup/collection.rb', line 18 def relate_lookup_collection belongs_to :referenced, :polymorphic => true end |