diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-01-16 21:14:34 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-01-16 21:32:12 +0000 |
commit | a2dab46cae35a06fd5c5500037177492a047c252 (patch) | |
tree | af4be28070368eccdc1151df59384c9ca7aee1bf /activerecord/lib/active_record/associations | |
parent | 46ea4442f3abc33d15e03487bae1c80346eab49a (diff) | |
download | rails-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/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/association_scope.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/builder/association.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index 3759af26d6..0209ce36df 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -20,7 +20,7 @@ module ActiveRecord # It's okay to just apply all these like this. The options will only be present if the # association supports that option; this is enforced by the association builder. scope = scope.apply_finder_options(options.slice( - :readonly, :include, :order, :limit, :joins, :group, :having, :offset, :select)) + :readonly, :include, :references, :order, :limit, :joins, :group, :having, :offset, :select)) if options[:through] && !options[:include] scope = scope.includes(source_options[:include]) diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index d4f59100e8..6e2e5f9de0 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -1,7 +1,7 @@ module ActiveRecord::Associations::Builder class Association #:nodoc: class_attribute :valid_options - self.valid_options = [:class_name, :foreign_key, :select, :conditions, :include, :extend, :readonly, :validate] + self.valid_options = [:class_name, :foreign_key, :select, :conditions, :include, :extend, :readonly, :validate, :references] # Set by subclasses class_attribute :macro |