aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_scope.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #7983 from georgebrock/bug7950-squashed"Carlos Antonio da Silva2013-01-151-15/+1
| | | | | | | | | | | This reverts commit 88a296dccc401da143d90cad54b693ff06bf2b58, reversing changes made to 666a7e34f553cef4c8878362eafc79c7e3f310c3. Conflicts: activerecord/CHANGELOG.md Reason: this has been resulting in some hard to track bugs and is introducing a possible breackage in a stable version.
* Merge pull request #7983 from georgebrock/bug7950-squashedCarlos Antonio da Silva2012-11-161-1/+15
|\ | | | | | | | | | | | | | | Backport 4bc2ae0 to fix #7950 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb
| * use bind values for join columnsAaron Patterson2012-11-101-1/+16
|/ | | | | | | | | | This is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13. It fixes bug #7950. Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/lib/active_record/relation/finder_methods.rb
* predicate builder should not recurse for determining where columns.Aaron Patterson2012-05-301-1/+16
| | | | | | Thanks to Ben Murphy for reporting this CVE-2012-2661
* fix associations when using per class databasesLars Kanis2012-03-041-1/+1
| | | | | | would get ConnectionNotEstablished error because it always tried to use ActiveRecord::Base's connection, even though it should be using the connection of the model whose context we're operating in
* Use uniq instead of manually putting a DISTINCT in the queryJon Leighton2011-11-051-14/+2
|
* Merge pull request #3030 from htanata/fix_habtm_select_query_methodJon Leighton2011-09-261-4/+0
| | | | Fix: habtm doesn't respect select query method
* Fix belongs_to polymorphic with custom primary key on target.Jon Leighton2011-09-261-1/+6
| | | | Closes #3104.
* use association_primary_key in AssociationScope#add_constraintsMarian Rudzynski2011-05-261-1/+1
|
* Fix problem with loading polymorphic associations which have been defined in ↵Jon Leighton2011-05-221-5/+15
| | | | an abstract superclass. Fixes #552.
* Fix tests under postgres - we should always put conditions in the WHERE part ↵Jon Leighton2011-03-121-5/+8
| | | | not in ON constraints because postgres requires that the table has been joined before the condition references it.
* Abstract some common code from AssociationScope and ↵Jon Leighton2011-03-111-44/+12
| | | | JoinDependency::JoinAssociation into a JoinHelper module
* Rename Reflection#through_reflection_chain and #through_options to ↵Jon Leighton2011-03-101-6/+6
| | | | Reflection#chain and Reflection#options as they now no longer relate solely to through associations.
* Move the code which builds a scope for through associations into a generic ↵Jon Leighton2011-03-101-0/+149
AssociationScope class which is capable of building a scope for any association.