aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorEdo Balvers <i@edo.me>2013-08-09 12:58:46 +0200
committerEdo Balvers <i@edo.me>2013-10-08 16:41:53 +0200
commit7cab255a97fceb48e3b59b3d39b5fe58c6dad54b (patch)
tree80f9f2389016da0f9e10f036ae78b4883ea2f462 /activerecord/lib/active_record
parentd2d6e4a980800cefce4066724ddd541ae22730c1 (diff)
downloadrails-7cab255a97fceb48e3b59b3d39b5fe58c6dad54b.tar.gz
rails-7cab255a97fceb48e3b59b3d39b5fe58c6dad54b.tar.bz2
rails-7cab255a97fceb48e3b59b3d39b5fe58c6dad54b.zip
Fixes #11773 when using includes combined with select, the select statement was overwritten.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 0132a02f83..fb8f44b188 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -261,7 +261,7 @@ module ActiveRecord
end
def construct_relation_for_association_find(join_dependency)
- relation = except(:select).select(join_dependency.columns)
+ relation = except(:select).select(join_dependency.columns + select_values)
apply_join_dependency(relation, join_dependency)
end