aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
Commit message (Collapse)AuthorAgeFilesLines
* Remove various comments and code which were just being used during the ↵Jon Leighton2010-10-191-5/+0
| | | | development of nested through association support (OMFGZ, I might just have nearly finished this\!
* Support the :primary_key option on a through reflection in a nested through ↵Jon Leighton2010-10-191-1/+16
| | | | association
* Support for :primary_key option on the source reflection of a through ↵Jon Leighton2010-10-192-6/+18
| | | | association, where the source is a has_one or has_many
* Respect the :primary_key option on the through_reflection of (non-nested) ↵Jon Leighton2010-10-192-2/+37
| | | | through associations
* Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-193-8/+42
| | | | through association
* Make sure nested through associations are read onlyJon Leighton2010-10-151-0/+42
|
* Add assertions for nested through associations loaded by includes with ↵Jon Leighton2010-10-151-81/+75
| | | | conditions (uses the single-query strategy). Currently one failure to fix.
* Support preloading nested through associations (using the default ↵Jon Leighton2010-10-151-61/+140
| | | | multi-query strategy)
* Remove unnecessary requires from nested_has_many_through_associations_test.rbJon Leighton2010-10-141-6/+0
|
* Add test_has_one_through_has_one_through_with_belongs_to_source_reflectionJon Leighton2010-10-141-2/+13
|
* Add test_has_many_through_belongs_to_with_has_many_through_source_reflection ↵Jon Leighton2010-10-141-1/+12
| | | | (which already passes)
* Add test_has_many_through_has_many_through_with_belongs_to_source_reflection ↵Jon Leighton2010-10-141-1/+12
| | | | (which already works)
* Added ↵Jon Leighton2010-10-142-2/+17
| | | | test_has_many_through_has_many_with_has_many_through_habtm_source_reflection and make it pass
* Add ↵Jon Leighton2010-10-131-1/+11
| | | | test_has_many_through_has_and_belongs_to_many_with_has_many_source_reflection and make it work
* First bit of support for habtm in through assocs - ↵Jon Leighton2010-10-132-5/+10
| | | | test_has_many_through_has_many_with_has_and_belongs_to_many_source_reflection now passes
* Add a commented, failing test for using a habtm in a has many through ↵Jon Leighton2010-10-122-6/+11
| | | | association. I want to refactor how aliasing works first.
* Add test_has_many_through_has_one_through_with_has_many_source_reflectionJon Leighton2010-10-121-1/+18
|
* Adding test_has_many_through_has_one_with_has_many_through_source_reflection ↵Jon Leighton2010-10-121-2/+19
| | | | and modifying ThroughAssociationScope to make it work correctly.
* Rename some tests for consistencyJon Leighton2010-10-121-3/+3
|
* Add test_has_many_through_has_one_throughJon Leighton2010-10-121-2/+14
|
* Support has_one through assocs as the source associationJon Leighton2010-10-121-3/+32
|
* A load of tests that need to be writtenJon Leighton2010-10-121-0/+63
|
* Add support for nested through associations in JoinAssociation. Hence ↵Jon Leighton2010-10-091-5/+54
| | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored.
* Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-063-0/+26
|\
| * AssociationCollection#include? working properly for objects added with build ↵Marcelo Giorgi2010-09-303-0/+26
| | | | | | | | method [#3472 state:resolved]
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵Jon Leighton2010-10-064-11/+33
| | | | | | | | including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered.
* | A failing test for a nested has many through association loaded via ↵Jon Leighton2010-10-051-0/+6
| | | | | | | | Foo.joins(:bar)
* | Fix the tests (I have actually verified that these are also the 'right' ↵Jon Leighton2010-10-032-11/+11
| | | | | | | | fixes, rather than just making the tests pass again)
* | Add support for table aliasing, with a test that needs aliasing in order to ↵Jon Leighton2010-10-021-0/+5
| | | | | | | | work correctly. This test incidentally provides a more complicated test case (4 inner joins, 2 using polymorphism).
* | Integrate nested support into ThroughAssociationScope, using my concept of ↵Jon Leighton2010-10-021-12/+12
| | | | | | | | generating a 'chain' of reflections to be joined. It seems to work at the moment, all existing tests are passing. There may be further complications as we add more test cases for nested associations, though.
* | Started implementing nested :through associations by using the existing ↵Jon Leighton2010-10-011-13/+13
| | | | | | | | structure of ThroughAssociationScope rather than layering a module over the top
* | Merge branch 'master' into nested_has_many_through_2Jon Leighton2010-09-305-0/+46
|\|
| * Revert "porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master"Aaron Patterson2010-09-281-6/+0
| | | | | | | | This reverts commit bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.
| * Set attributes properly for model built from association with conditions ↵Marcelo Giorgi2010-09-285-0/+46
| | | | | | | | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to masterAaron Patterson2010-09-281-0/+6
| |
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-262-8/+43
|/
* remove join table rows before removing owner row for habtm associations, ↵Hemant Kumar2010-09-211-1/+1
| | | | fixes#5674
* providing arel with column information when possible [#5392 state:resolved]Aaron Patterson2010-09-211-0/+10
|
* Change relation merging to always append select, group and order valuesPratik Naik2010-08-312-41/+10
|
* removing unused codeAaron Patterson2010-08-221-2/+2
|
* updated test_should_record_timestamp_for_join_table for OracleRaimonds Simanovskis2010-08-221-1/+1
|
* While creating a new record using has_many create method default scope of ↵Neeraj Singh2010-08-191-0/+19
| | | | | | | | | | | child should be respected. author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* avoids warnings about mismatched indentations in Ruby 1.9.2Xavier Noria2010-08-191-8/+5
|
* code gardening: we have assert_(nil|blank|present), more concise, with ↵Xavier Noria2010-08-174-6/+6
| | | | better default failure messages - let's use them
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-143-14/+14
| | | | 's/[ \t]*$//' -i {} \;)
* fixed indentation in test casesMark Turner2010-08-111-2/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Merge branch 'master' into mysql2Brian Lopez2010-08-021-1/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Bring returning back to ease migration. Remove duplicated logic. Eager loading an association should not change the count of children fix loading of different elements in array then int and string [#5036 state:resolved] Tidy up previous commit. test and fix collection_singular_ids= with string primary keys [#5125 state:resolved] Handle edge cases in the previous patch. Improved how AppGenerator generates the application name. It now detects the current app name whenever possible. This means that renaming the residing directory will not effect the app name generated by AppGenerator. ActiveModel::Errors json serialization to work as Rails 3b4 [#5254 state:resolved] Add missing require in ActiveSupport::HashWithIndifferentAccess [#5189 state:resolved] Add an internal (private API) after_touch callback. [#5271 state:resolved] added failing touch propagation test Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax Failing test to check for route file corruption if legacy map parameter is used. [#5263 state:open] Corrected the rake test:units and test:functionals description [#5251 state:committed] Use AS::OrderedHash when trusting in the order of the hash Fix label form helper to use I18n and html options, without the need of 'nil' text param:
| * Tidy up previous commit.José Valim2010-08-021-1/+1
| |
| * test and fix collection_singular_ids= with string primary keys [#5125 ↵Robert Pankowecki2010-08-021-1/+39
| | | | | | | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | update tests for mysql2 supportBrian Lopez2010-08-022-3/+8
|/