aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* quarantine deprecated testsJon Leighton2012-05-181-20/+0
|
* Merge pull request #5453 from ↵Aaron Patterson2012-05-161-0/+6
|\ | | | | | | | | JonRowe/patch_uniq_has_and_belongs_to_many_when_already_loaded When Active Record has already loaded a unique association `.size` returns the wrong number.
| * when using a preloaded array and the uniq flag is set then return the size ↵Jon Rowe2012-03-151-0/+6
| | | | | | | | of the uniq array
* | Remove #=== quirkJon Leighton2012-05-111-5/+0
| | | | | | | | Makes it consistent with Relation. Can't see a use for this.
* | CollectionProxy < RelationJon Leighton2012-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps bring the interfaces of CollectionProxy and Relation closer together, and reduces the delegation backflips we need to perform. For example, first_or_create is defined thus: class ActiveRecord::Relation def first_or_create(...) first || create(...) end end If CollectionProxy < Relation, then post.comments.first_or_create will hit the association's #create method which will actually add the new record to the association, just as post.comments.create would. With the previous delegation, post.comments.first_or_create expands to post.comments.scoped.first_or_create, where post.comments.scoped has no knowledge of the association.
* | more deprecations manually fixedJon Leighton2012-04-271-7/+7
| |
* | find and replace deprecated keysJon Leighton2012-04-271-7/+7
| |
* | %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵Jon Leighton2012-04-271-7/+7
| | | | | | | | things
* | remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-261-8/+8
| |
* | remove deprecate #calculate callsJon Leighton2012-04-261-7/+0
| |
* | fix testsJon Leighton2012-04-131-4/+4
|/
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-161-2/+14
| | | | | | See the CHANGELOG for details. Fixes #950.
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-2/+2
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-2/+2
|
* Delete obsolete commentJon Leighton2011-12-161-1/+0
|
* Cache columns at the model level.Jon Leighton2011-12-161-2/+2
| | | | Allows two models to use the same table but have different primary keys.
* Use `table_exists?` from the schema cache.Aaron Patterson2011-12-091-3/+3
|
* Deprecate set_table_name in favour of self.table_name= or defining your own ↵Jon Leighton2011-11-291-5/+5
| | | | method.
* use GeneratedFeatureMethods module for associationsJosh Susser2011-11-271-1/+21
|
* Fixed failed test under 1.8.7 as map.keys order in indeterminableRocky Jaiswal2011-09-281-1/+1
|
* Merge pull request #3030 from htanata/fix_habtm_select_query_methodJon Leighton2011-09-261-0/+8
| | | | Fix: habtm doesn't respect select query method
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-2/+2
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* added an alias for new to build to the AR collection proxy, this corrects an ↵Josh Kalderimis2011-06-011-0/+15
| | | | issue where the collection proxies were not consistent
* added assertion for non-standard primary_key on models used in the ↵Marian Rudzynski2011-05-261-0/+3
| | | | primary_key test
* use association_primary_key in AssociationScope#add_constraintsMarian Rudzynski2011-05-261-0/+7
|
* Added new #update_column method.Sebastian Martinez2011-03-271-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert "Removed #update_attribute method. New #update_column method."Sebastian Martinez2011-03-271-1/+1
| | | | | | This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Removed #update_attribute method. New #update_column method.Sebastian Martinez2011-03-261-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-96/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * Add interpolation of association conditions back in, in the form of proc { ↵Jon Leighton2011-02-141-1/+1
| | | | | | | | ... } rather than instance_eval-ing strings
| * Make record.association.destroy(*records) on habtm and hm:t only delete ↵Jon Leighton2011-02-071-8/+22
| | | | | | | | records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry.
| * adjust query counts to be consistent across databases, make sure database ↵Aaron Patterson2011-02-041-3/+6
| | | | | | | | log the same things
| * column cache now lives on the connection poolAaron Patterson2011-02-041-2/+2
| |
| * almost fistedAaron Patterson2011-02-041-2/+2
| |
| * Fixing ordering of HABTM association deletion [#6191 state:resolved]Edward Faulkner2011-02-041-1/+1
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * Removed support for accessing attributes on a has_and_belongs_to_many join ↵Jon Leighton2011-01-161-83/+0
| | | | | | | | table. This has been documented as deprecated behaviour since April 2006. Please use has_many :through instead. A deprecation warning will be added to the 3-0-stable branch for the 3.0.4 release.
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-171-17/+15
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb
| * fisting a bunch of unused variable warningsAaron Patterson2010-11-151-4/+2
| |
| * use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | First bit of support for habtm in through assocs - ↵Jon Leighton2010-10-131-1/+1
| | | | | | | | 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-121-4/+4
|/ | | | association. I want to refactor how aliasing works first.
* AssociationCollection#include? working properly for objects added with build ↵Marcelo Giorgi2010-09-301-0/+6
| | | | method [#3472 state:resolved]
* Set attributes properly for model built from association with conditions ↵Marcelo Giorgi2010-09-281-0/+10
| | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* remove join table rows before removing owner row for habtm associations, ↵Hemant Kumar2010-09-211-1/+1
| | | | fixes#5674
* Change relation merging to always append select, group and order valuesPratik Naik2010-08-311-21/+5
|
* updated test_should_record_timestamp_for_join_table for OracleRaimonds Simanovskis2010-08-221-1/+1
|
* update tests for mysql2 supportBrian Lopez2010-08-021-2/+7
|
* removing unused models from testsSubba Rao Pasupuleti2010-07-211-6/+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]