Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix for get_ids when including a belongs_to association on a has_many ↵ | Diego Algorta | 2010-05-15 | 1 | -0/+4 |
| | | | | | | association [#2896 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix eager loading of associations causing table name collisions | Ernie Miller | 2010-04-28 | 1 | -0/+9 |
| | | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | kill warnings on 1.8.7 [#4331 state:resolved] | Aaron Patterson | 2010-04-10 | 1 | -4/+4 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Add tests to prevent regression of lazy evaluation of has_many ..., ↵ | Andrew White | 2010-04-04 | 1 | -0/+18 |
| | | | | | | | | :dependent => :___ [#2627 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Dont try to load the record from the db if preloading didn't find anything | Pratik Naik | 2010-03-31 | 1 | -0/+6 |
| | |||||
* | Fix failing test in MySQL. | Emilio Tagua | 2010-03-30 | 1 | -3/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix honoring :primary_key option when joining or eager loading a belongs_to ↵ | Ernie Miller | 2010-03-29 | 1 | -0/+13 |
| | | | | | | | | association [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add :dependent = to has_one and has_many [#3075 state:resolved] | Rizwan Reza | 2010-03-28 | 3 | -2/+24 |
| | |||||
* | removing dead code from activerecord tests. [#4187 state:resolved] | Aaron Patterson | 2010-03-15 | 2 | -21/+0 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | cleaning up a bunch of parse time warnings in AR [#4186 state:resolved] | Aaron Patterson | 2010-03-15 | 3 | -5/+5 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Hack to keep column metadata queries out of test query counts | Jeremy Kemper | 2010-03-15 | 1 | -3/+7 |
| | |||||
* | Fix associations to call :destroy or :delete based on the right :dependent ↵ | Carlos Antonio da Silva | 2010-03-09 | 3 | -27/+29 |
| | | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Remove find_with_associations and related code from associations now that ↵ | Pratik Naik | 2010-01-20 | 1 | -15/+0 |
| | | | | Relation handles that stuff | ||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -28/+0 |
| | |||||
* | Remove the test which was testing a non-existing method, always failing on ↵ | Pratik Naik | 2010-01-02 | 1 | -6/+0 |
| | | | | 1.9 and never even running on 1.8 | ||||
* | Oops. Remove debug information inside a test from the previous commit | Pratik Naik | 2009-12-29 | 1 | -2/+0 |
| | |||||
* | Migrate all the calculation methods to Relation | Pratik Naik | 2009-12-29 | 1 | -0/+2 |
| | |||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -4/+4 |
| | |||||
* | Fix pg test | Jeremy Kemper | 2009-12-28 | 1 | -1/+2 |
| | |||||
* | Make polymorphic_inverse_of in Reflection throw an ↵ | Murray Steele | 2009-12-28 | 1 | -2/+15 |
| | | | | | | InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Provide a slightly more robust we_can_set_the_inverse_on_this? method for ↵ | Murray Steele | 2009-12-28 | 1 | -1/+16 |
| | | | | | | | | polymorphic belongs_to associations. [#3520 state:resolved] Also add a new test for polymorphic belongs_to that test direct accessor assignment, not just .replace assignment. Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Add inverse polymorphic association support. [#3520 state:resolved] | George Ogata | 2009-12-28 | 1 | -19/+81 |
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Add more tests for the various ways we can assign objects to associations. ↵ | Murray Steele | 2009-12-28 | 1 | -11/+159 |
| | | | | | | | | [#3513 state:resolved] Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance). Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Set inverse for #replace on a has_one association. [#3513 state:resolved] | George Ogata | 2009-12-28 | 1 | -0/+15 |
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Relation#readonly(false) should toggle the readonly flag | Pratik Naik | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Remove unused construct_finder_sql | Pratik Naik | 2009-12-28 | 1 | -14/+14 |
| | |||||
* | Add Model.from and association_collection#from finder methods | Pratik Naik | 2009-12-28 | 1 | -8/+1 |
| | |||||
* | Add new finder methods to association collection. | Pratik Naik | 2009-12-27 | 1 | -4/+4 |
| | |||||
* | Forgot to revert tests from that last commit | Joshua Peek | 2009-12-12 | 1 | -8/+0 |
| | |||||
* | Revert "Fix instance_eval calls to association proxies" | Joshua Peek | 2009-12-12 | 1 | -1/+0 |
| | | | | | | | | | | I think it may of broke the build. Lets see. This reverts commit 49e943c4f0ac3459bd53023167aaa08fc8e46733. Conflicts: activerecord/test/cases/associations/has_many_associations_test.rb | ||||
* | Fix postgresql AR test failure | John Pignata | 2009-12-11 | 1 | -2/+2 |
| | | | | | | | | Due to the ordering of the returning result set, the test fails under the postgresql adapter. Order results by id prior to checking the first item [#3542 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix instance_eval calls to association proxies | Mat Brown | 2009-12-02 | 1 | -0/+8 |
| | | | | | | | | In the current stable, ActiveRecord::Associations::AssociationProxy#method_missing calls yield() if a block is given, causing the block to always be evaluated in its calling context. However, in the case of instance_eval, correct behavior requires that the block be passed directly to the @target, rather than being evaluated inside a different block. Incidentally, this also simplifies the code slightly. [#3412 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Revert "Revert "Assert primary key does not exist in habtm when the ↵ | Jeremy Kemper | 2009-11-23 | 1 | -14/+2 |
| | | | | | | | | | | | | | association is defined, instead of doing that everytime a record is inserted."" This reverts commit 2b82708b0efb3a3458e8177beab58f0c585788ae. [#3128 state:resolved] Conflicts: activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb | ||||
* | Insert generated association members in the same order they are specified ↵ | Gabe da Silveira | 2009-11-17 | 1 | -0/+22 |
| | | | | | | | | when assigning to a has_many :through using the generated *_ids method [#3491 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | delete correct records for a has_many with :primary_key and :dependent => ↵ | Matt Jones | 2009-11-10 | 1 | -0/+12 |
| | | | | | | :delete_all Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Merge branch 'associations_2' | Emilio Tagua | 2009-10-05 | 1 | -1/+1 |
|\ | |||||
| * | Added eager loading support to Relation and ActiveRecord#all. | Emilio Tagua | 2009-10-05 | 1 | -1/+1 |
| | | |||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-10-02 | 1 | -0/+18 |
|\ \ | |||||
| * | | Make has_one with :conditions hash scope build or creation of the associated ↵ | Luciano G Panaro | 2009-09-28 | 1 | -0/+18 |
| | | | | | | | | | | | | | | | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed] | ||||
* | | | Merge commit 'rails/master' | Emilio Tagua | 2009-09-14 | 1 | -0/+9 |
|\| | | |||||
| * | | Fix has_one with foreign_key and primary_key association bug which caused ↵ | Graeme Porteous | 2009-09-12 | 1 | -0/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | | | Merge commit 'rails/master' | Emilio Tagua | 2009-09-08 | 1 | -1/+1 |
|\| | | |||||
| * | | Changed ActiveRecord to use new callbacks and speed up observers by only ↵ | José Valim | 2009-09-08 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | | | Merge commit 'rails/master' | Emilio Tagua | 2009-09-08 | 1 | -2/+14 |
|\| | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb | ||||
| * | | Revert "Assert primary key does not exist in habtm when the association is ↵ | Jeremy Kemper | 2009-09-02 | 1 | -2/+14 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined, instead of doing that everytime a record is inserted." Test failures on PostgreSQL. [#3128 state:open] This reverts commit da636809daca9c338200811d3590e446f57c8e81. | ||||
* | | | Merge commit 'rails/master' | Emilio Tagua | 2009-09-01 | 1 | -14/+2 |
|\| | | |/ |/| | | | | | Conflicts: activerecord/lib/active_record/associations.rb | ||||
| * | Assert primary key does not exist in habtm when the association is defined, ↵ | José Valim | 2009-09-01 | 1 | -14/+2 |
| | | | | | | | | | | | | | | | | instead of doing that everytime a record is inserted. [#3128 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | | Use finder options as relation method names to provide more familiar | Emilio Tagua | 2009-08-18 | 1 | -5/+5 |
| | | | | | | | | | | naming. Use bang methods convention in methods that alter the relation. | ||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-08-17 | 1 | -1/+1 |
|\| | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb | ||||
| * | Fix test_has_many_through_polymorphic_has_one on sqlite2 [#3054 state:resolved] | Jay Pignata | 2009-08-15 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> |