aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/belongs_to_associations_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* code gardening: we have assert_(nil|blank|present), more concise, with ↵Xavier Noria2010-08-171-1/+1
| | | | better default failure messages - let's use them
* update tests for mysql2 supportBrian Lopez2010-08-021-1/+1
|
* 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>
* removing unused models from testsSubba Rao Pasupuleti2010-07-211-2/+0
| | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fix test_belongs_to_with_primary_key_joins_on_correct_column test on OracleRaimonds Simanovskis2010-06-041-0/+4
|
* Use better assertion methods for testingNeeraj Singh2010-05-191-2/+2
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* kill warnings on 1.8.7 [#4331 state:resolved]Aaron Patterson2010-04-101-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* 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-281-1/+7
|
* Fix associations to call :destroy or :delete based on the right :dependent ↵Carlos Antonio da Silva2010-03-091-6/+26
| | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com>
* Removed duplicated tests [#3026 state:resolved]Arthur Zapparoli2009-08-101-18/+0
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* added :order option to find :first methods and associations as otherwise ↵Raimonds Simanovskis2009-08-061-2/+4
| | | | | | | | Oracle tests were failing Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method
* Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-0/+98
| | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fixed autosave checks on objects with hm:t in :include [#2213 state:resolved]Will Bryant2009-03-121-0/+16
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-2/+2
| | | | [#1617 state:resolved]
* Ensure belongs_to association with a counter cache in name spaced model ↵Adam Cooper2009-03-061-0/+17
| | | | | | works [#1678 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed that autosave should validate associations even if master is invalid ↵David Heinemeier Hansson2009-02-271-129/+0
| | | | [#1930 status:committed]
* Ensure methods called on association proxies respect access control. [#1083 ↵Pratik Naik2008-10-131-0/+10
| | | | state:resolved] [Adam Milligan, Pratik]
* Remove the functionality introduce in 28d3390Michael Koziarski2008-10-101-13/+0
| | | | There are several situations it doesn't cater for, and the inconsistency isn't worth blocking 2.2.
* Support for updating a belongs to association from the foreign key (without ↵Jon Leighton2008-09-131-0/+13
| | | | | | | saving and reloading the record) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#142 state:committed]
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add :validate option to associations. [#301 state:resolved]Jan De Poorter2008-06-111-0/+19
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* belongs_to polymorphic association assignments update the foreign_id and ↵Tim Harper2008-05-311-1/+28
| | | | | | | | | | | foreign_type fields regardless of whether the record being assigned is new or not. fixes the following scenarios: * I have validates_inclusion_of on the type field for a polymorphic belongs_to association. I assign a new record to the model's polymorphic relationship of the proper type. validation fails because the type field has not been updated. * I replace the value for a ppolymorphic association to a new record of another class. The type field still says its the previous class, and the id field points to the previous record as well. [#191 state:closed]
* Added :select option to has_one and belongs_to, remove unused :order option ↵josevalim2008-05-241-0/+5
| | | | | | | on belongs_to. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#241 state:resolved]
* Don't rely on association proxying object_id. [#225 state:resolved]Jeremy Kemper2008-05-191-2/+2
|
* Revert "Ensure that save on child object fails for invalid belongs_to ↵Michael Koziarski2008-04-111-12/+0
| | | | | | association. Closes #11555. [rubyruy]" This reverts commit c67e985994362290308073ed2793dd8e7f2a76db.
* Ensure that save on child object fails for invalid belongs_to association. ↵Pratik Naik2008-04-101-0/+12
| | | | | | Closes #11555. [rubyruy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Split associations_test.rb into multiple files based on association type. ↵Pratik Naik2008-04-061-0/+380
[Pratik] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de