aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations
Commit message (Collapse)AuthorAgeFilesLines
* Move tests to casesJeremy Kemper2008-01-187-1543/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More thoroughly quote table names. Exposes some issues with sqlite2 adapter. ↵Jeremy Kemper2008-01-051-7/+7
| | | | | | Closes #10698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Continue evolution toward ActiveSupport::TestCase and friends. #10679 ↵Jeremy Kemper2008-01-057-8/+8
| | | | | | | | | [Josh Peek] * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: introduce instance_variable_names. Closes #10630 [Frederick ↵Jeremy Kemper2007-12-281-1/+1
| | | | | | Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance ↵Jeremy Kemper2007-12-222-4/+4
| | | | | | vars git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager belongs_to :include infers the foreign key from the association name ↵Jeremy Kemper2007-12-211-0/+5
| | | | | | rather than the class name. Closes #10517. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8456 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that the :uniq option for has_many :through associations retains the ↵Rick Olson2007-12-111-0/+6
| | | | | | order. #10463 [remvee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove empty ar_joins_testJeremy Kemper2007-12-101-0/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager association test. Closes #10381 [alexey]Jeremy Kemper2007-12-051-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Try againDavid Heinemeier Hansson2007-12-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that options[:from] table names should never be quoted [DHH]David Heinemeier Hansson2007-12-051-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix HasManyThrough Association so it uses :conditions on the HasMany ↵Rick Olson2007-11-111-0/+6
| | | | | | Association. Closes #9729 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that column names are quoted. Closes #10134 [wesley.moxam]Michael Koziarski2007-11-101-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Address shortcomings of changeset [8054] [protocool]David Heinemeier Hansson2007-11-072-158/+88
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce finder :joins with associations. Same :include syntax but with ↵Jeremy Kemper2007-10-291-0/+158
| | | | | | inner rather than outer joins. Closes #10012. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through delete with custom foreign keys. Closes #6466.Jeremy Kemper2007-10-271-1/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981.Jeremy Kemper2007-10-261-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Limited eager loading no longer ignores scoped :order. Closes #9561 [danger, ↵Marcel Molina2007-10-231-0/+9
| | | | | | josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor association create and build so before & after callbacks behave ↵Jeremy Kemper2007-10-161-0/+34
| | | | | | consistently. Closes #8854. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Alias association #build to #new so it behaves predictably. Closes #8787.Jeremy Kemper2007-10-151-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Uncomment test for join model method_missing. Closes #8707 [Giles Bowkett, ↵Jeremy Kemper2007-10-151-2/+2
| | | | | | Josh Peek] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make size for has_many :through use counter cache if it exists. Closes ↵Rick Olson2007-09-301-0/+9
| | | | | | #9734 [xaviershay] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7692 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Associations macros accept extension blocks alongside modules. Closes #9346.Jeremy Kemper2007-09-171-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager loading respects explicit :joins. Closes #9496.Jeremy Kemper2007-09-151-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* OpenBase: update for new lib and latest Rails. Support migrations. Closes #8748.Jeremy Kemper2007-09-131-2/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Kill lingering actsJeremy Kemper2007-09-111-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved acts_as_tree into a plugin of the same name on the official Rails svn ↵David Heinemeier Hansson2007-09-111-27/+0
| | | | | | (closes #9514) [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't clobber :includes passed to count on has_many association. Closes ↵Michael Koziarski2007-08-161-0/+6
| | | | | | #9175 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure has_many associations honour :include when counting. Closes #9167 ↵Michael Koziarski2007-08-161-0/+7
| | | | | | [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that has_many :through associations use a count query instead of ↵Rick Olson2007-07-251-0/+6
| | | | | | loading the target when #size is called. Closes #8800 [lifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #count on a has_many :through association so that it recognizes the ↵Rick Olson2007-07-201-1/+10
| | | | | | :uniq option. Closes #8801 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make create! on a has_many :through association return the association ↵Michael Koziarski2007-07-111-1/+1
| | | | | | object. Not the collection. Closes #8786 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix polymorphic has_one associations declared in an abstract class. Closes ↵Jeremy Kemper2007-06-251-2/+11
| | | | | | #8638. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update tests' use of fixtures for the new collections api. Closes #8726.Jeremy Kemper2007-06-223-12/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated push_with_attributes.Jeremy Kemper2007-06-111-30/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow a polymorphic :source for has_many :through associations. Closes ↵Rick Olson2007-03-131-0/+12
| | | | | | #7143 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot to add tests for #7044Rick Olson2007-03-131-0/+145
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through << with custom foreign keys. Closes #6466, #7153.Jeremy Kemper2007-03-051-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: use a subselect to correctly perform eager finds with :limit and ↵Jeremy Kemper2007-01-121-0/+10
| | | | | | :order. Closes #4668. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sybase adapter fixes. Closes #6926 [jsheets]Michael Koziarski2007-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: resolve test failures, use prefetched primary key for inserts, check ↵Jeremy Kemper2006-11-011-3/+4
| | | | | | for null defaults. Factor out some common methods from all adapters. Closes #6515. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through to add the appropriate conditions when going through ↵Rick Olson2006-10-152-1/+20
| | | | | | an association using STI. Closes #5783. [Jonathan Viney] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restore eager condition interpolation, document it's differences [Rick]Rick Olson2006-10-111-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add #delete support to has_many :through associations. Closes #6049 [Martin ↵Rick Olson2006-10-091-0/+33
| | | | | | Landers] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removes the ability for eager loaded conditions to be interpolated, since ↵Rick Olson2006-10-091-1/+1
| | | | | | there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The has_many create method works with polymorphic associations. Closes #6361.Jeremy Kemper2006-10-081-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* organize associations testsJeremy Kemper2006-09-255-0/+1102
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de