Constructor
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
string
$name: The association name
-
array
$options: Options for the association
Check the associate to make sure it has been saved
void
before_save
( $record)
Build a new associated object from an associative array of attributes and assign it to the object
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
array
$attributes: The attributes for the new object to associate with our record
Create and save a new associated object from an associative array of attributes and assign it to the object
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
array
$attributes: The attributes for the new object to associate with our record
Implements the 'include' behavior for a find operation
void
do_include
( &$results, array $results)
-
array
$results: The result set to process
-
&$results
Redefinition of:
- ActiveRecord_Association::do_include()
- Implements the 'include' behavior for a find operation
Accessor method for the associated object
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
boolean
$force_reload: If true, forces reloading of the object even if it's cached
Mutator method for the associated object
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
object
$value: The new object to associate with our record
Mutator method for the foreign key. This is redefined to invalidate any cached object.
-
ActiveRecord_Base
$record: An instance of the class the association is being added to
-
ActiveRecord_Proxy
$proxy: A proxy for the class to allow limited access to protected methods
-
mixed
$value: The new key value
Inherited Methods
Inherited From ActiveRecord_Association
ActiveRecord_Association::class_name()
ActiveRecord_Association::do_include()
ActiveRecord_Association::foreign_key()
ActiveRecord_Association::name()