aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove find_with_associations and related code from associations now that ↵Pratik Naik2010-01-201-67/+0
| | | | Relation handles that stuff
* Simplify construct_finder_arel_* methodsPratik Naik2010-01-181-27/+7
|
* Merge docrailsPratik Naik2010-01-171-5/+3
|
* Rename Model.active_relation to Model.unscopedPratik Naik2010-01-171-2/+2
|
* Rename active_relation_engine -> arel_engine and active_relation_table -> ↵Pratik Naik2010-01-161-8/+8
| | | | arel_table
* Make scopes use relations under the hoodPratik Naik2010-01-161-123/+96
|
* Ensure using proper engine for Arel::TablePratik Naik2010-01-121-4/+4
|
* Delay building arel relation as long as possible for improved introspectionPratik Naik2010-01-121-7/+8
|
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-3/+3
|
* Cleanup some code in nested_attributes.rb, autosave_association.rb, and ↵Eloy Duran2010-01-071-4/+3
| | | | | | associations.rb with AssociationReflection#collection_association? Also cache the result value.
* Reapply "Remove optional join_dependency argument as Relation always ↵Pratik Naik2010-01-031-2/+1
| | | | supplies it" - Now without syntax errors
* Revert "Remove optional join_dependency argument as Relation always supplies it"Jeremy Kemper2010-01-021-1/+2
| | | | This reverts commit 8e57deed8b4efad6ea1c551f415b74596111f890.
* Remove optional join_dependency argument as Relation always supplies itPratik Naik2010-01-031-2/+1
|
* Remove unused code from association.rb now that Relation takes care of ↵Pratik Naik2010-01-031-78/+0
| | | | checking the referenced tables
* Simply methods for checking eager loaded tables references in the queryPratik Naik2010-01-031-7/+7
|
* Rename Model.arel_table to Model.active_relationPratik Naik2010-01-021-2/+2
|
* Remove unncessary arguments passed to arel_tablePratik Naik2010-01-011-1/+2
|
* Use PredicateBuilder for sql hash sanitizationPratik Naik2010-01-011-1/+1
|
* Migrate all the calculation methods to RelationPratik Naik2009-12-291-6/+5
|
* Merge commit 'Fingertips/master'Jeremy Kemper2009-12-281-2/+2
|\
| * Make polymorphic_inverse_of in Reflection throw an ↵Murray Steele2009-12-281-2/+2
| | | | | | | | | | | | InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* | Add Model.having and Relation#havingPratik Naik2009-12-291-2/+4
|/
* Use relation.from when constructing a relationPratik Naik2009-12-281-2/+3
|
* Add new finder methods to association collection.Pratik Naik2009-12-271-2/+2
|
* Rename Model.conditions and relation.conditions to .wherePratik Naik2009-12-261-3/+3
|
* When passing force_reload = true to an association, don't use the query ↵Will2009-12-161-2/+2
| | | | | | cache [#1827 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Revert "Revert "Assert primary key does not exist in habtm when the ↵Jeremy Kemper2009-11-231-1/+9
| | | | | | | | | | | | | association is defined, instead of doing that everytime a record is inserted."" This reverts commit 2b82708b0efb3a3458e8177beab58f0c585788ae. [#3128 state:resolved] Conflicts: activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
* Insert generated association members in the same order they are specified ↵Gabe da Silveira2009-11-171-2/+3
| | | | | | | | when assigning to a has_many :through using the generated *_ids method [#3491 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Split arel_table into method to get a relation and another to ↵Jeremy Kemper2009-11-131-2/+2
| | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068.
* Split arel_table into method to get a relation and another to memoize the ↵Jeremy Kemper2009-11-131-2/+2
| | | | default relation.
* Ruby 1.9.2: avoid #flattenJeremy Kemper2009-11-131-6/+10
|
* delete correct records for a has_many with :primary_key and :dependent => ↵Matt Jones2009-11-101-1/+1
| | | | | | :delete_all Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Arel::In -> Arel::Predicates::InJeremy Kemper2009-11-021-1/+1
|
* Merge branch 'associations_2'Emilio Tagua2009-10-051-2/+2
|\
| * Added eager loading support to Relation and ActiveRecord#all.Emilio Tagua2009-10-051-2/+2
| |
* | Merge commit 'rails/master'Emilio Tagua2009-10-021-1/+3
|\ \
| * | Make has_one with :conditions hash scope build or creation of the associated ↵Luciano G Panaro2009-09-281-1/+3
| | | | | | | | | | | | | | | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed]
* | | Merge commit 'rails/master'Emilio Tagua2009-09-141-3/+4
|\| |
| * | Added some documentation about setting :autosave => false on an association.Eloy Duran2009-09-121-3/+4
| | |
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-17/+36
|\| |
| * | Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-17/+36
| | | | | | | | | | | | | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-11/+2
|\| | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * | Revert "Assert primary key does not exist in habtm when the association is ↵Jeremy Kemper2009-09-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined, instead of doing that everytime a record is inserted." Test failures on PostgreSQL. [#3128 state:open] This reverts commit da636809daca9c338200811d3590e446f57c8e81.
* | | Merge commit 'rails/master'Emilio Tagua2009-09-011-2/+11
|\| | | |/ |/| | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Assert primary key does not exist in habtm when the association is defined, ↵José Valim2009-09-011-12/+12
| | | | | | | | | | | | | | | | instead of doing that everytime a record is inserted. [#3128 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Remove useless conditionals/local var.Emilio Tagua2009-08-191-5/+1
| |
* | Make sure join association methods are called once.Emilio Tagua2009-08-191-9/+10
| |
* | Don't sanitize_sql where it doesn't make sense.Emilio Tagua2009-08-191-2/+2
| |
* | Remove old method and comment.Emilio Tagua2009-08-191-14/+0
| |
* | Remove useless InnerJoinDependency, inner joins are performed throughEmilio Tagua2009-08-191-21/+4
| | | | | | | | Arel::InnerJoin.