diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-12-26 16:10:47 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-12-26 16:12:56 -0700 |
commit | b98668decb9712f26118de57623fd15d7d28646d (patch) | |
tree | 7051a3854ea8da9a357566deb14c4a0daadf9d7c /activerecord/test/cases/inheritance_test.rb | |
parent | 6d4a19cd503b39bdbefae7c1c527b24ad2e3a36a (diff) | |
download | rails-b98668decb9712f26118de57623fd15d7d28646d.tar.gz rails-b98668decb9712f26118de57623fd15d7d28646d.tar.bz2 rails-b98668decb9712f26118de57623fd15d7d28646d.zip |
Go through normal `where` logic when preloading associations
This will allow eager type casting to take place as needed. There
doesn't seem to be any particular reason that the `in` statement was
forced for single values, and the commit message where it was introduced
gives no context.
See
https://github.com/rails/rails/commit/d90b4e2615e8048fdeffc6dffe3246704adee01f
Diffstat (limited to 'activerecord/test/cases/inheritance_test.rb')
-rw-r--r-- | activerecord/test/cases/inheritance_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index 0338669016..fe6323ab02 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -304,7 +304,7 @@ class InheritanceTest < ActiveRecord::TestCase def test_eager_load_belongs_to_primary_key_quoting con = Account.connection - assert_sql(/#{con.quote_table_name('companies')}.#{con.quote_column_name('id')} IN \(1\)/) do + assert_sql(/#{con.quote_table_name('companies')}.#{con.quote_column_name('id')} = 1/) do Account.all.merge!(:includes => :firm).find(1) end end |