Method: Mongoid::Relations::Referenced::Many#initialize
- Defined in:
- lib/mongoid/relations/referenced/many.rb
#initialize(base, target, metadata) ⇒ Many
Instantiate a new references_many relation. Will set the foreign key and the base on the inverse object.
238 239 240 241 242 |
# File 'lib/mongoid/relations/referenced/many.rb', line 238 def initialize(base, target, ) init(base, Targets::Enumerable.new(target), ) do raise_mixed if klass. end end |