aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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]
* Ensure that primary_keys of HABTM records is not double quotedNeeraj Singh2010-07-201-0/+18
| | | | [#5152 state:reslved]
* Fixed gruoped_by_title spelling [#5063 state:committed]Ben Somers2010-07-081-2/+2
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Remove find_with_associations and related code from associations now that ↵Pratik Naik2010-01-201-15/+0
| | | | Relation handles that stuff
* Merge commit 'rails/master'Emilio Tagua2009-08-081-2/+4
|\ | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb
| * 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
* | More work on removing plain SQL from associations and use ARel instead.Emilio Tagua2009-08-071-4/+4
|/
* Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-011-0/+7
| | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
* Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-221-5/+0
| | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql.
* Generate proper :counter_sql from :finder_sql when there is a newline ↵Patrick Joyce2009-06-211-0/+5
| | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
|
* Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved]Luca Guidi2009-03-121-0/+27
| | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-1/+1
| | | | [#1617 state:resolved]
* Ensure self referential HABTM associations raise an exception if ↵Tom Lea2009-03-061-0/+8
| | | | | | association_foreign_key is missing. [#1252 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.Jeremy Kemper2009-02-031-6/+4
|
* Fix has_and_belongs_to_many_associations tests. #1738Pratik Naik2009-01-181-2/+2
|
* Cache columns for has_and_belongs_to_many associationslukeludwig2009-01-171-0/+11
| | | | | This avoids repeatedly calling SHOW COLUMNS when the association is queried [#1738 state:committed]
* Add :having option to find, to use in combination with grouped finds. Also ↵miloops2008-12-011-0/+5
| | | | | | | added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1028 state:committed]