diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-06 02:31:27 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 02:31:27 +0900 |
commit | b802e08273f899d5f3b199f7c6a4f5d514c1b0e1 (patch) | |
tree | b5d4311248bc42e52f63ffdec81957a22a5f7cc3 /activerecord/test | |
parent | 299a213a738e078c6fbddd488a711ea9bb066fe2 (diff) | |
parent | 93f19071ad9d337a9f6f2fc9278c33e05597951d (diff) | |
download | rails-b802e08273f899d5f3b199f7c6a4f5d514c1b0e1.tar.gz rails-b802e08273f899d5f3b199f7c6a4f5d514c1b0e1.tar.bz2 rails-b802e08273f899d5f3b199f7c6a4f5d514c1b0e1.zip |
Merge pull request #34626 from gmcgibbon/sqlite_pluck_quoting
Fix join table column quoting with SQLite.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/calculations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index 4cb0dc66ed..4d3db912c5 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -721,6 +721,10 @@ class CalculationsTest < ActiveRecord::TestCase assert_equal [], Topic.includes(:replies).order(:id).offset(5).pluck(:id) end + def test_pluck_with_join + assert_equal [[2, 2], [4, 4]], Reply.includes(:topic).pluck(:id, :"topics.id") + end + def test_group_by_with_limit expected = { "Post" => 8, "SpecialPost" => 1 } actual = Post.includes(:comments).group(:type).order(:type).limit(2).count("comments.id") |