aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_proxy.rb
Commit message (Collapse)AuthorAgeFilesLines
* Raise error when trying to select many polymorphic objects with has_many ↵Rick Olson2006-03-191-0/+1
| | | | | | :through or :include (closes #4226) [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fixed has_many :conditions sanitizing (closes #4278) [hakuja@hakuja.net]Rick Olson2006-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use association's :conditions when eager loading. [jeremyevans0@gmail.com] ↵Rick Olson2006-03-161-2/+11
| | | | | | closes #4144 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.abstract_class? that marks which classes are not part of the ↵Rick Olson2006-03-161-1/+1
| | | | | | Active Record hierarchy. closes #3704 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* save polymorphic joins from the has_many|one association (closes #3812) ↵David Heinemeier Hansson2006-02-121-0/+9
| | | | | | [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added option inheritance for find calls on has_and_belongs_to_many and ↵David Heinemeier Hansson2005-12-131-0/+11
| | | | | | | | has_many assosociations [DHH] Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH] Added form_remote_for (form_for meets form_remote_tag) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added preliminary support for join models [DHH] Added preliminary support ↵David Heinemeier Hansson2005-12-031-18/+20
| | | | | | 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
* Work-in progress for providing better join model support and polymorphic ↵David Heinemeier Hansson2005-12-021-1/+0
| | | | | | associations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Associations handle case-equality more consistently: item.parts.is_a?(Array) ↵Jeremy Kemper2005-11-151-5/+12
| | | | | | and item.parts === Array. Closes #1345. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added extension capabilities to has_many and has_and_belongs_to_many proxies ↵David Heinemeier Hansson2005-11-031-2/+5
| | | | | | [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix bad commit. (Bad developer, bad\!)Nicholas Seckar2005-10-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add __FILE__ and __LINE__ to evalNicholas Seckar2005-10-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for calling constrained class methods on has_many and ↵David Heinemeier Hansson2005-07-221-7/+8
| | | | | | 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
* Fixed order of loading in eager associationsDavid Heinemeier Hansson2005-04-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speeded up eager loading a whole bunchDavid Heinemeier Hansson2005-04-181-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new Base.find API and deprecated find_all, find_first. Added ↵David Heinemeier Hansson2005-04-031-0/+5
| | | | | | preliminary support for eager loading of associations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont load the target before the proxy has had a chance to answer the ↵David Heinemeier Hansson2005-03-291-2/+1
| | | | | | respond_to? -- this would cause an .empty? query to trigger loading the entire collection if the proxy had already been initialized git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added destruction of dependent objects in has_one associations when a new ↵David Heinemeier Hansson2005-03-061-0/+4
| | | | | | 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-0/+5
| | | | | | 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
* Only remember that an association was loaded if it was foundDavid Heinemeier Hansson2005-01-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@435 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to association should always honor a present foreign key and ↵David Heinemeier Hansson2005-01-171-1/+28
| | | | | | condition interpolation should also be possible on belongs_to git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for associating unsaved objects #402 [Tim Bates]David Heinemeier Hansson2005-01-151-0/+49
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