aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorEarl J St Sauver <estsauver@gmail.com>2014-04-15 21:43:24 -0700
committerEarl St Sauver <estsauver@gmail.com>2014-04-21 14:42:59 -0700
commit70b377f4648403b6facbe29b10e179eb649327a9 (patch)
tree2dad3b20025be364965b0893c9478915e2d1b3c2 /activerecord/lib/active_record/associations
parent43f525031ad3f83a04f84e79bbe1de340bf937aa (diff)
downloadrails-70b377f4648403b6facbe29b10e179eb649327a9.tar.gz
rails-70b377f4648403b6facbe29b10e179eb649327a9.tar.bz2
rails-70b377f4648403b6facbe29b10e179eb649327a9.zip
select! renamed to avoid name collision Array#select!
Fixes #14752 Select mimics the block interface of arrays, but does not mock the block interface for select!. This change moves the api to be a private method, _select!.
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/preloader/association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb
index 69b65982b3..e2b1cef463 100644
--- a/activerecord/lib/active_record/associations/preloader/association.rb
+++ b/activerecord/lib/active_record/associations/preloader/association.rb
@@ -116,7 +116,7 @@ module ActiveRecord
scope.where_values = Array(values[:where]) + Array(preload_values[:where])
scope.references_values = Array(values[:references]) + Array(preload_values[:references])
- scope.select! preload_values[:select] || values[:select] || table[Arel.star]
+ scope._select! preload_values[:select] || values[:select] || table[Arel.star]
scope.includes! preload_values[:includes] || values[:includes]
if preload_values.key? :order