aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-06-28 12:36:42 -0400
committerGitHub <noreply@github.com>2017-06-28 12:36:42 -0400
commit2f36c9889a3696f4e8282b56cf344faa75cee334 (patch)
tree1d337e13bb1ba4ae4d2f7af36cbf37ea4a111e8f /activerecord/lib
parent5241b265126ac9ecadf1414feaf4c42ceb056432 (diff)
parentbf3f2010003326a42d86a88425e3c66242c2f2f1 (diff)
downloadrails-2f36c9889a3696f4e8282b56cf344faa75cee334.tar.gz
rails-2f36c9889a3696f4e8282b56cf344faa75cee334.tar.bz2
rails-2f36c9889a3696f4e8282b56cf344faa75cee334.zip
Merge pull request #29604 from kamipo/fix_ids_reader_to_respect_case_sensitive_pk
Fix `ids_reader` to respect case sensitive primary key
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb
index 0cb17b47e8..583ee11907 100644
--- a/activerecord/lib/active_record/associations/collection_association.rb
+++ b/activerecord/lib/active_record/associations/collection_association.rb
@@ -44,10 +44,7 @@ module ActiveRecord
if loaded?
target.pluck(reflection.association_primary_key)
else
- @association_ids ||= (
- column = "#{reflection.quoted_table_name}.#{reflection.association_primary_key}"
- scope.pluck(column)
- )
+ @association_ids ||= scope.pluck(reflection.association_primary_key)
end
end