From 84c69a165380d4ae92322d4503a5b9a7201f6369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 8 May 2013 23:10:04 -0300 Subject: Revert "Merge pull request #8209 from senny/backport_8176" This reverts commit 724020278480855bddfe749c91f1074d4f50f3c6, reversing changes made to e4e2bcce75b85fb8c1c49509a17bd5dfe6034c32. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb Reason: This caused a regression since it changed the behavior in a stable release. Fixes #9777 --- activerecord/test/cases/calculations_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'activerecord/test/cases/calculations_test.rb') diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index a1dc1de38d..b9050c750f 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -493,9 +493,8 @@ class CalculationsTest < ActiveRecord::TestCase assert_equal [1,2,3,4], Topic.order(:id).pluck("topics.id") end - def test_pluck_replaces_select_clause - taks_relation = Topic.select([:approved, :id]).order(:id) - assert_equal [1,2,3,4], taks_relation.pluck(:id) + def test_pluck_does_not_replace_select_clause + taks_relation = Topic.select("approved, id, id AS foo_id").order(:foo_id) assert_equal [false, true, true, true], taks_relation.pluck(:approved) end -- cgit v1.2.3