aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
Commit message (Collapse)AuthorAgeFilesLines
* 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
|/
* Don't increment and then decrement the same counter when re-assigning a ↵Tarmo Tänav2010-07-291-0/+4
| | | | | | | | belongs_to association [#2786 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* fixed joining of attributes when using find_or_create_by with multiple ↵Jon Buda2010-07-281-0/+9
| | | | | | attributes through an association Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* removing unused models from testsSubba Rao Pasupuleti2010-07-214-11/+0
| | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Timestamp columns of HABTM join table should record timestampsNeeraj Singh2010-07-211-1/+34
| | | | [#5161 state:resolved]
* Ensure that primary_keys of HABTM records is not double quotedNeeraj Singh2010-07-201-0/+18
| | | | [#5152 state:reslved]
* Removed warnings when a variable is shadowedŁukasz Strzałkowski2010-07-191-2/+2
|
* fixing typeo. thanks bamnet!Aaron Patterson2010-07-161-1/+1
|
* JoinDependency#graft does not properly set parent join [#5124 state:resolved]David Genord II2010-07-161-0/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove unintentional API changes. [#1108]Pratik Naik2010-07-141-41/+9
|
* count method should not take options if it is operated on has_many ↵Neeraj Singh2010-07-131-0/+26
| | | | | | | | association which has finder_sql or counter_sql [#2395 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* string IDs are now quoted correctly [#5064 state:resolved]Will St. Clair + Neeraj Singh2010-07-131-1/+11
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* renaming test name to fix accidently overrideSubba Rao Pasupuleti2010-07-131-1/+1
| | | | | | [#5076 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Eager loading :through associations will join the :source model if there are ↵Grant Ammons2010-07-081-0/+6
| | | | | | :conditions. [#2362 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fix ActiveRecord `destroy_all` so it returns destroyed recordsMislav Marohnić2010-07-081-2/+5
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* This test never runs and it has never run. Since the day this fileNeeraj Singh2010-07-081-4/+0
| | | | | | | | was created this test has name not beginning with test_. Also this test is trying to use has_many on another has_many which is not supported. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed gruoped_by_title spelling [#5063 state:committed]Ben Somers2010-07-081-2/+2
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* AssociationCollection#create_by_*, find_or_create_by_* work properly now. ↵Aaron Patterson2010-06-291-0/+62
| | | | | | [#1108 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Order is not guaranteed here, ordering by id of people table makes it workSantiago Pastorino2010-06-251-2/+2
|
* Make sure about which is the first element of the query, fixes a postgresql ↵Santiago Pastorino2010-06-091-2/+2
| | | | | | 8.4 failing test Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix multiple self-referencing eager loads failing to join multiple timesErnie Miller2010-06-081-1/+9
| | | | | | [#4679 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge remote branch 'rsim/oracle_enhanced_rails3'wycats2010-06-072-1/+5
|\
| * fix test_belongs_to_with_primary_key_joins_on_correct_column test on OracleRaimonds Simanovskis2010-06-041-0/+4
| |
| * do order by id when finding first fixture to ensure that it is correct oneRaimonds Simanovskis2010-06-041-1/+1
| | | | | | | | (as otherwise was failing under JRuby and oracle_enhanced adapter)
* | removes Array#random_element and backports Array#sample from Ruby 1.9, ↵Xavier Noria2010-06-051-7/+7
|/ | | | thanks to Marc-Andre Lafortune
* Use better assertion methods for testingNeeraj Singh2010-05-198-31/+24
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Change on Array extension from rand => random_element [#4555 state:committed]Santiago Pastorino2010-05-161-7/+7
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Make use of assert_equal to test equallity between object assert expects and ↵Santiago Pastorino2010-05-161-1/+1
| | | | | | | | object and a message of error [#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix for get_ids when including a belongs_to association on a has_many ↵Diego Algorta2010-05-151-0/+4
| | | | | | association [#2896 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix eager loading of associations causing table name collisionsErnie Miller2010-04-281-0/+9
| | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* kill warnings on 1.8.7 [#4331 state:resolved]Aaron Patterson2010-04-101-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add tests to prevent regression of lazy evaluation of has_many ..., ↵Andrew White2010-04-041-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 anythingPratik Naik2010-03-311-0/+6
|
* Fix failing test in MySQL.Emilio Tagua2010-03-301-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 Miller2010-03-291-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 Reza2010-03-283-2/+24
|
* removing dead code from activerecord tests. [#4187 state:resolved]Aaron Patterson2010-03-152-21/+0
| | | | Signed-off-by: wycats <wycats@gmail.com>
* cleaning up a bunch of parse time warnings in AR [#4186 state:resolved]Aaron Patterson2010-03-153-5/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Hack to keep column metadata queries out of test query countsJeremy Kemper2010-03-151-3/+7
|
* Fix associations to call :destroy or :delete based on the right :dependent ↵Carlos Antonio da Silva2010-03-093-27/+29
| | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove find_with_associations and related code from associations now that ↵Pratik Naik2010-01-201-15/+0
| | | | Relation handles that stuff
* Make scopes use relations under the hoodPratik Naik2010-01-161-28/+0
|