diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-13 07:56:17 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-13 07:56:17 +0900 |
commit | 58d52171bb8c7a5589bb13ce1bab81d635ae9cf0 (patch) | |
tree | 3e71eb1e93fd09aeef86eb4893b5c92f3a81d718 /activerecord/test/cases | |
parent | faca40dfd4032bbe2373210255eb7aa1c6527503 (diff) | |
download | rails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.tar.gz rails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.tar.bz2 rails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.zip |
Add a test case for #20802
The issue #20802 has been fixed in cc0b566.
Closes #20802.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation/where_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index c7b2ac90fb..cbc466d6b8 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -289,6 +289,11 @@ module ActiveRecord assert_equal essays(:david_modest_proposal), essay end + def test_where_on_association_with_select_relation + essay = Essay.where(author: Author.where(name: "David").select(:name)).take + assert_equal essays(:david_modest_proposal), essay + end + def test_where_with_strong_parameters protected_params = Class.new do attr_reader :permitted |