Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge pull request #3507 from jmazzi/issue-3503 | Jeremy Kemper | 2011-11-03 | 1 | -2/+6 | |
| | | | | Preserve SELECT columns on the COUNT for finder_sql when possible | |||||
* | Changed a few instances of of words in the API docs written in British ↵ | Oemuer Oezkir | 2011-07-24 | 1 | -1/+1 | |
| | | | | | | English to American English(according to Weber) | |||||
* | Fix bug in collection_singular_ids on has many through association with ↵ | Anatoliy Lysenko | 2011-07-06 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | conditions and includes, when condtions references tables from includes. Test fail because of invalid sql: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: comments.id: SELECT "posts".id FROM "posts" INNER JOIN "readers" ON "posts"."id" = "readers"."post_id" WHERE "readers"."person_id" = 1 AND (comments.id is null) Bug described in github#925 This commit will revert fix from https://github.com/rails/rails/commit/3436fdfc12d58925e3d981e0afa61084ea34736c , but tests is ok. Bug described in #6569 ticket. | |||||
* | Fixed CollectionAssociation#find to be compatible with Array#find | Bogdan Gusiev | 2011-07-05 | 1 | -3/+7 | |
| | | | | | In order to make CollectionAssociation behave closer to Array Add the ability to pass block to #find method just like Array#find does. | |||||
* | Assign the association attributes to the associated record before the ↵ | Jon Leighton | 2011-06-30 | 1 | -6/+0 | |
| | | | | before_initialize callback of the record runs. Fixes #1842. | |||||
* | Replace inline lambdas with named methods | Jon Leighton | 2011-06-12 | 1 | -29/+42 | |
| | ||||||
* | 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. |