There's no documentation for this item.
| Public Methods |
| << |
Add records to this association. Returns self so method
calls may be chained. Since << flattens its argument list and inserts
each record, push and concat behave identically.
|
| any? |
|
| clear |
Removes all records from this association. Returns self so method
calls may be chained.
|
| concat |
Alias for #<<
|
| create |
|
| create! |
|
| delete |
Remove records from this association. Does not destroy
records.
|
| delete_all |
Remove all records from this association
|
| destroy_all |
|
| empty? |
|
| length |
Returns the size of the collection by loading it and calling size on the
array. If you want to use this method to check whether the collection is
empty, use collection.length.zero? instead of collection.empty?
|
| push |
Alias for #<<
|
| replace |
Replace this collection with other_array This will perform a diff
and delete/add only records that have changed.
|
| 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
|
| to_ary |
|
| uniq |
|
<code/>and<pre/>for code samples.