Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Don't wrap operations on collection associations in transactions when they ↵ | benedikt | 2011-06-12 | 1 | -3/+9 | |
| | | | | are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database. | |||||
* | Don't double assign attributes - closes #1467. | Andrew White | 2011-06-03 | 1 | -1/+0 | |
| | ||||||
* | Only save the record once when calling create! on a collection association. ↵ | Jon Leighton | 2011-05-31 | 1 | -19/+21 | |
| | | | | Fixes #1360. | |||||
* | Implementing @dmathieu's cleaner fix from #1425. Unfortunately he deleted ↵ | Jon Leighton | 2011-05-31 | 1 | -8/+5 | |
| | | | | the branch so I cannot just merge it. | |||||
* | Adding comment to work with 1.8.7. Nested Attribute fix. | Arun Agrawal | 2011-05-31 | 1 | -0/+3 | |
| | ||||||
* | Fix nested attribute for memory record. | Arun Agrawal | 2011-05-31 | 1 | -1/+5 | |
| | ||||||
* | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 | |
| | ||||||
* | Pass the attribute and option hashes to build_association | Andrew White | 2011-05-17 | 1 | -2/+6 | |
| | | | | | | | 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. | |||||
* | These extra array operations appear to be unnecessary. Reasoning: | Jon Leighton | 2011-05-14 | 1 | -8/+2 | |
| | | | | | * 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) | |||||
* | CollectionAssociation#merge_target_lists should write to the underlying ↵ | Jon Leighton | 2011-05-14 | 1 | -5/+2 | |
| | | | | attributes when copying, rather than using the assignment method | |||||
* | An attempt to make CollectionAssociation#merge_target_lists make more sense. | Jon Leighton | 2011-05-14 | 1 | -16/+35 | |
| | ||||||
* | Instead of doing find(:all) which does scoped.find(:all) which does ↵ | Jon Leighton | 2011-05-13 | 1 | -1/+1 | |
| | | | | scoped.all, just do scoped.all. | |||||
* | Remove pointless rescue (it doesn't happen anywhere in the tests, and I ↵ | Jon Leighton | 2011-05-13 | 1 | -9/+1 | |
| | | | | can't see a way that it would happen ever) | |||||
* | Modified CollectionAssociation to refer to the new class name. | Michael Ebens | 2011-05-11 | 1 | -1/+1 | |
| | ||||||
* | Remove unnecessary '|| {}' | Jon Leighton | 2011-05-10 | 1 | -1/+1 | |
| | ||||||
* | Don't use mass-assignment protection when applying the ↵ | Jon Leighton | 2011-05-10 | 1 | -2/+4 | |
| | | | | scoped.scope_for_create. Fixes #481. | |||||
* | Fix #480. Passing nil to create association works. | José Valim | 2011-05-10 | 1 | -1/+1 | |
| | ||||||
* | Revert "b9ea751d0e56bd00d341766977a607ed3f7ddd0f". | José Valim | 2011-05-10 | 1 | -26/+27 | |
| | | | | | Wrapping each Record.associations.build in a transaction is going to make several unneeded queries. Reverting this commit also fixes #479. | |||||
* | singular and collection relations in AR can now specify mass-assignment ↵ | Josh Kalderimis | 2011-05-01 | 1 | -10/+10 | |
| | | | | security options (:as and :without_protection) in build, create and create! methods. | |||||
* | Removing the scope-caching which happens on association proxies, because the ↵ | Jon Leighton | 2011-04-12 | 1 | -12/+0 | |
| | | | | query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs | |||||
* | Move the code which builds a scope for through associations into a generic ↵ | Jon Leighton | 2011-03-10 | 1 | -13/+0 | |
| | | | | AssociationScope class which is capable of building a scope for any association. | |||||
* | Use proper objects to do the work to build the associations (adding methods, ↵ | Jon Leighton | 2011-02-21 | 1 | -0/+39 | |
| | | | | callbacks etc) rather than calling a whole bunch of methods with rather long names. | |||||
* | Delegate Association#options to the reflection, and replace ↵ | Jon Leighton | 2011-02-21 | 1 | -24/+24 | |
| | | | | 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations. | |||||
* | Associations - where possible, call attributes methods rather than directly ↵ | Jon Leighton | 2011-02-21 | 1 | -49/+49 | |
| | | | | accessing the instance variables | |||||
* | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -0/+510 | |
manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. |