aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple self-referencing eager loads failing to join multiple timesErnie Miller2010-06-081-2/+2
| | | | | | [#4679 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge remote branch 'rsim/oracle_enhanced_rails3'wycats2010-06-071-1/+2
|\
| * Downcase quoted table name in regex in count_aliases_from_table_joinsRaimonds Simanovskis2010-06-041-1/+2
| | | | | | | | Oracle adapter's quote_table_name returns quoted table name in uppercase and therefore it should be downcased before scanning downcased join_sql
* | Require active support/string/conversions so constantize can be used in ↵Tom Meier2010-06-071-0/+1
|/ | | | | | associations.rb Signed-off-by: José Valim <jose.valim@gmail.com>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge branch 'master' of git://github.com/rails/railsRizwan Reza2010-05-171-1/+1
|\
| * Fix for get_ids when including a belongs_to association on a has_many ↵Diego Algorta2010-05-151-1/+1
| | | | | | | | | | | | association [#2896 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | better documentation for dependent option [#4564 state:resolved]Neeraj Singh2010-05-161-4/+5
|/
* eliminate alias_method_chain from ActiveRecordwycats2010-05-091-8/+8
|
* Fix eager loading of associations causing table name collisionsErnie Miller2010-04-281-17/+60
| | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Destroy respects optimistic locking.Curtis Hawthorne2010-04-271-1/+10
| | | | | | | | | | Now works with :dependent => :destroy and includes unit tests for that case. Also includes better error messages when updating/deleting stale objects. [#1966 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...)Jeremy Kemper2010-04-101-3/+4
|
* Bring back +extra_conditions+. This effectively reverts ↵Carl Lerche2010-04-031-3/+3
| | | | 386b7bfd9d78a6d8c8bc7cc4a310df806ad0ba57
* Make the query built by has_many ...., :dependent => :____ lazy since all ↵Carl Lerche2010-04-021-50/+22
| | | | the information is not really available yet.
* Remove an unused argumentCarl Lerche2010-04-021-2/+1
|
* Fix honoring :primary_key option when joining or eager loading a belongs_to ↵Ernie Miller2010-03-291-1/+1
| | | | | | | | association [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add :dependent = to has_one and has_many [#3075 state:resolved]Rizwan Reza2010-03-281-2/+37
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* avoiding a few closure references by evaling. [#4223 state:resolved]Aaron Patterson2010-03-271-12/+18
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Merge branch 'master' into docrailswycats2010-03-261-9/+0
|\
| * Move methods from association to relation finder methods.Emilio Tagua2010-03-251-9/+0
| |
* | fix habtm documentation to correct typoJeremy Roman2010-03-261-1/+1
|/ | | | Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
* cleaning up some test warningsAaron Patterson2010-03-141-2/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Fix associations to call :destroy or :delete based on the right :dependent ↵Carlos Antonio da Silva2010-03-091-3/+3
| | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com>
* drying up more code in associations.rbAaron Patterson2010-03-061-17/+11
| | | | Signed-off-by: wycats <wycats@gmail.com>
* deleting repeated codeAaron Patterson2010-03-061-17/+7
| | | | Signed-off-by: wycats <wycats@gmail.com>
* 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
|