Module: Mongoid::Association::Embedded::EmbedsMany::Proxy::ClassMethods
- Included in:
- Mongoid::Association::Embedded::EmbedsMany::Proxy
- Defined in:
- lib/mongoid/association/embedded/embeds_many/proxy.rb
Overview
Class-level methods for the Proxy class.
Instance Method Summary collapse
-
#eager_loader(associations, docs) ⇒ Mongoid::Association::Embedded::Eager
Returns the eager loader for this association.
-
#embedded? ⇒ true
Returns true if the association is an embedded one.
-
#foreign_key_suffix ⇒ nil
Returns the suffix of the foreign key field, either “_id” or “_ids”.
Instance Method Details
#eager_loader(associations, docs) ⇒ Mongoid::Association::Embedded::Eager
Returns the eager loader for this association.
30 31 32 |
# File 'lib/mongoid/association/embedded/embeds_many/proxy.rb', line 30 def eager_loader(associations, docs) Eager.new(associations, docs) end |
#embedded? ⇒ true
Returns true if the association is an embedded one. In this case always true.
41 42 43 |
# File 'lib/mongoid/association/embedded/embeds_many/proxy.rb', line 41 def true end |
#foreign_key_suffix ⇒ nil
Returns the suffix of the foreign key field, either “_id” or “_ids”.
51 52 53 |
# File 'lib/mongoid/association/embedded/embeds_many/proxy.rb', line 51 def foreign_key_suffix nil end |