| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The build_association method was added as an API for plugins
to hook into in 1398db0. This commit restores this API and the
ability to override class.new to return a subclass based on
a virtual attribute in the attributes hash.
|
|
|
|
|
| |
* It is not necessary to subtract 'id' from the list of copied attributes because record and mem_record are equal, so therefore their id attributes are also equal (so there is no harm in copying it, and this reduces the complexity of the code)
* It is not necessary to intersect the attribute names, since record and mem_record are equal, so they have the same id and class, so they have the same columns in the database. If record has non-column attributes then it seems reasonable to also copy them onto mem_record (though I am not sure what situation this would ever happen in)
|
|
|
|
| |
attributes when copying, rather than using the assignment method
|
| |
|
|
|
|
| |
scoped.all, just do scoped.all.
|
|
|
|
| |
can't see a way that it would happen ever)
|
| |
|
| |
|
|
|
|
| |
scoped.scope_for_create. Fixes #481.
|
| |
|
|
|
|
|
| |
Wrapping each Record.associations.build in a transaction is going to
make several unneeded queries. Reverting this commit also fixes #479.
|
|
|
|
| |
security options (:as and :without_protection) in build, create and create! methods.
|
|
|
|
| |
query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs
|
|
|
|
| |
AssociationScope class which is capable of building a scope for any association.
|
|
|
|
| |
callbacks etc) rather than calling a whole bunch of methods with rather long names.
|
|
|
|
| |
'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
|
|
|
|
| |
accessing the instance variables
|
|
manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
|