Class

HasManyThroughAssociation

Extends:

There's no documentation for this item.

Public Methods
<< Adds records to the association. The source record and its associates must have ids in order to create records associating them, so this will raise ActiveRecord::HasManyThroughCantAssociateNewRecords if either is a new record. Calls create! so you can rescue errors.
build
count
create!
delete Removes records from this association. Does not destroy records.
find
method Alias for #<<
new
new Alias for #build
reset
size Returns the size of the collection by executing a SELECT COUNT(*) query if the collection hasn’t been loaded and calling collection.size if it has. If it’s more likely than not that the collection does have a size larger than zero and you need to fetch that collection afterwards, it’ll take one less SELECT query if you use length.
sum Calculate sum using SQL, not Enumerable
Protected Methods
cached_counter_attribute_name
conditions
construct_conditions Build SQL conditions from attributes, qualified by table name.
construct_from
construct_join_attributes Construct attributes for :through pointing to owner and associate.
construct_joins
construct_owner_attributes Construct attributes for associate pointing to owner.
construct_quoted_owner_attributes Associate attributes pointing to owner, quoted.
construct_scope
construct_select
construct_sql
find_target
has_cached_counter?
method_missing
sql_conditions Alias for #conditions
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.