123456789_123456789_123456789_123456789_123456789_

Class: Mongoid::Association::Referenced::HasOneThrough::Proxy

Relationships & Source Files
Namespace Children
Modules:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Mongoid::Association::One
Defined in: lib/mongoid/association/referenced/has_one_through/proxy.rb

Overview

Read-only proxy for has_one :through associations. Instances are returned by the association getter. Write attempts raise ReadonlyAssociation.

Constant Summary

::Mongoid::Association::Proxy - Inherited

KEEPER_METHODS

Class Attribute Summary

ClassMethods - Extended

embedded?

Returns true if the association is an embedded one.

Class Method Summary

ClassMethods - Extended

::Mongoid::Association::Proxy - Inherited

.apply_ordering

Apply ordering to the criteria if it was defined on the association.

.new

Sets the target and the association metadata properties.

Instance Attribute Summary

::Mongoid::Association::Proxy - Inherited

#_association,
#_base

Model instance for the base of the association.

#_target

Model instance for one to one associations, or array of model instances for one to many associations, for the target of the association.

::Mongoid::Threaded::Lifecycle - Included

#_assigning

Begin the assignment of attributes.

#_assigning?

Is the current thread in assigning mode?

#_binding

Execute a block in binding mode.

#_binding?

Is the current thread in binding mode?

#_building

Execute a block in building mode.

#_building?

Is the current thread in building mode?

#_creating?

Is the current thread in creating mode?

#_loading

Execute a block in loading mode.

#_loading?

Is the current thread in loading mode?

Instance Method Summary

::Mongoid::Association::One - Inherited

#__evolve_object_id__

Evolve the proxy document into an object id.

#clear

Clear this relation - same as calling #delete on the document.

#in_memory

Get all the documents in the relation that are loaded into memory.

#respond_to?

Since method_missing is overridden we should override this as well.

::Mongoid::Association::Proxy - Inherited

#extend_proxies

Allow extension to be an array and extend each module.

#extend_proxy,
#klass

Get the class from the association, or return nil if no association present.

#reset_unloaded

Resets the criteria inside the association proxy.

#substitutable

The default substitutable object for an association proxy is the clone of the target.

::Mongoid::Association::Marshalable - Included

#marshal_dump

Provides the data needed to Marshal.dump an association proxy.

#marshal_load

Takes the provided data and sets it back on the proxy.

Constructor Details

This class inherits a constructor from Mongoid::Association::Proxy