aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/join_model_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* remove deprecated callsJon Leighton2012-04-271-4/+4
|
* find and replace deprecated keysJon Leighton2012-04-271-15/+15
|
* %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵Jon Leighton2012-04-271-23/+23
| | | | things
* remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-261-7/+7
|
* remove deprecate #calculate callsJon Leighton2012-04-261-1/+1
|
* fix #scoped deprecationsJon Leighton2012-04-261-3/+3
|
* remove tests for #with_scope (it's now deprecated)Jon Leighton2012-04-251-8/+0
|
* fix testsJon Leighton2012-04-131-1/+1
|
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-161-1/+1
| | | | | | 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
|
* Deprecate set_table_name in favour of self.table_name= or defining your own ↵Jon Leighton2011-11-291-1/+1
| | | | method.
* Do not hardcode :id as it was ignored by mass assignment filterRaimonds Simanovskis2011-06-081-2/+2
| | | As a result test was failing on Oracle where ids are assigned by default from 1000
* Allow polymorphic has_one to work when the association is set before the ↵Jon Leighton2011-06-081-0/+11
| | | | owner has been saved. Fixes #1524.
* When you add a record to a polymorphic has_one, you should be able to access ↵Jon Leighton2011-06-081-1/+4
| | | | the owner from the associated record
* 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-1/+1
| | | | 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.
* Refactoring test_has_many_with_pluralize_table_names_false testGuillermo Iguaran2011-05-201-4/+1
|
* Adding missing requireGuillermo Iguaran2011-05-161-0/+1
|
* Fixing has_many association when ActiveRecord::Base.pluralize_table_names is ↵Guillermo Iguaran2011-05-151-0/+11
| | | | false. fixes #557
* Refactor test to avoid hackeryJon Leighton2011-04-151-4/+4
|
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-2/+3
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Added new #update_column method.Sebastian Martinez2011-03-271-6/+6
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Revert "Removed #update_attribute method. New #update_column method."Sebastian Martinez2011-03-271-6/+6
| | | | | | This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Removed #update_attribute method. New #update_column method.Sebastian Martinez2011-03-261-6/+6
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* adding missing requireAaron Patterson2011-03-221-0/+1
|
* oracle, y u defy meJon Leighton2011-03-161-1/+1
|
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-15/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Rewrote AssociationPreload.Jon Leighton2011-02-281-1/+1
| |
| * Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-181-1/+1
| |\ | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association.rb activerecord/lib/active_record/fixtures.rb
| | * Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-1/+1
| | | | | | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
| * | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-151-12/+15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb
| | * use underlying _read_attribute method rather than causing NoMethodErrorsAaron Patterson2011-01-111-1/+1
| | |
| | * In a number of places in the tests, we only need to turn off transactional ↵Jon Leighton2011-01-111-1/+2
| | | | | | | | | | | | fixtures when the DB does not support savepoints. This speeds the test run up by about 8-9% on my computer, when running rake test_sqlite3_mem :)
| | * Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵Jon Leighton2011-01-031-7/+0
| | | | | | | | | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
| | * Raise an error for associations which try to go :through a polymorphic ↵Jon Leighton2010-12-231-3/+8
| | | | | | | | | | | | association [#6212 state:resolved]
| | * define_attr_method must serialize nil correctlyAaron Patterson2010-12-201-0/+4
| | |
| * | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-201-11/+17
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb
| | * Fix various issues with the :primary_key option in :through associations ↵Jon Leighton2010-12-151-0/+16
| | | | | | | | | | | | [#2421 state:resolved]
| * | IdentityMap - Tests for IMMarcin Raczkowski2010-11-191-1/+1
| | |
* | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-12-121-10/+0
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG 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_through_association.rb
| * | not a responsibility for rails to testAaron Patterson2010-12-031-10/+0
| | |
* | | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-271-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb
| * | removing unused variablesAaron Patterson2010-11-221-1/+1
| |/
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-171-8/+8
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb
| * use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | - 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>
| * Add some tests for functionality in JoinAssociation which already exists but ↵Jon Leighton2010-10-131-2/+2
| | | | | | | | was previously untested
* | Added ↵Jon Leighton2010-10-141-1/+1
| | | | | | | | test_has_many_through_has_many_with_has_many_through_habtm_source_reflection and make it pass
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵Jon Leighton2010-10-061-2/+2
| | | | | | | | 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.
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-8/+0
|/