aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_one_association.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added preliminary support for join models [DHH] Added preliminary support ↵David Heinemeier Hansson2005-12-031-13/+14
| | | | | | for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't add the same conditions twice in has_one finder sql. References #2916.Jeremy Kemper2005-11-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include as an option for association declarations [DHH]David Heinemeier Hansson2005-11-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Parenthesize :conditionsJeremy Kemper2005-10-181-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix errors caused by assigning a has-one or belongs-to property to itselfJamis Buck2005-10-131-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for calling constrained class methods on has_many and ↵David Heinemeier Hansson2005-07-221-1/+1
| | | | | | has_and_belongs_to_many collections #1764 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the in-memory object, but dont orphan the existing oneDavid Heinemeier Hansson2005-06-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a second parameter to the build and create method for has_one that ↵David Heinemeier Hansson2005-06-061-0/+18
| | | | | | controls whether the existing association should be replaced (which means nullifying its foreign key as well). By default this is true, but false can be passed to prevent it. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Qualify the ids used such that eager loading can avoid ambigious keysDavid Heinemeier Hansson2005-04-131-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made eager loading work even moreDavid Heinemeier Hansson2005-04-031-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added destruction of dependent objects in has_one associations when a new ↵David Heinemeier Hansson2005-03-061-2/+7
| | | | | | assignment happens #742 [mindel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the belongs_to and has_one proxy would fail a test like 'if ↵David Heinemeier Hansson2005-01-181-2/+2
| | | | | | project.manager' -- this unfortunately also means that you can't call methods like project.manager.build unless there already is a manager on the project #492 [Tim Bates] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@456 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for associating unsaved objects #402 [Tim Bates]David Heinemeier Hansson2005-01-151-0/+48
Added replace to associations, so you can do project.manager.replace(new_manager) or project.milestones.replace(new_milestones) #402 [Tim Bates] Added build and create methods to has_one and belongs_to associations, so you can now do project.manager.build(attributes) #402 [Tim Bates] Fixed that Base#== wouldn't work for multiple references to the same unsaved object #402 [Tim Bates] Added that if a before_* callback returns false, all the later callbacks and the associated action are cancelled. If an after_* callback returns false, all the later callbacks are cancelled. Callbacks are generally run in the order they are defined, with the exception of callbacks defined as methods on the model, which are called last. #402 [Tim Bates] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de