aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-01-16 21:14:34 +0000
committerJon Leighton <j@jonathanleighton.com>2012-01-16 21:32:12 +0000
commita2dab46cae35a06fd5c5500037177492a047c252 (patch)
treeaf4be28070368eccdc1151df59384c9ca7aee1bf /activerecord/lib/active_record/relation
parent46ea4442f3abc33d15e03487bae1c80346eab49a (diff)
downloadrails-a2dab46cae35a06fd5c5500037177492a047c252.tar.gz
rails-a2dab46cae35a06fd5c5500037177492a047c252.tar.bz2
rails-a2dab46cae35a06fd5c5500037177492a047c252.zip
Deprecate inferred JOINs with includes + SQL snippets.
See the CHANGELOG for details. Fixes #950.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb
index c25570d758..7131aa29b6 100644
--- a/activerecord/lib/active_record/relation/spawn_methods.rb
+++ b/activerecord/lib/active_record/relation/spawn_methods.rb
@@ -122,7 +122,7 @@ module ActiveRecord
result
end
- VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset, :extend,
+ VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset, :extend, :references,
:order, :select, :readonly, :group, :having, :from, :lock ]
def apply_finder_options(options)
@@ -133,7 +133,7 @@ module ActiveRecord
finders = options.dup
finders.delete_if { |key, value| value.nil? && key != :limit }
- ([:joins, :select, :group, :order, :having, :limit, :offset, :from, :lock, :readonly] & finders.keys).each do |finder|
+ ((VALID_FIND_OPTIONS - [:conditions, :include, :extend]) & finders.keys).each do |finder|
relation = relation.send(finder, finders[finder])
end