diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-26 04:45:13 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-03-01 16:28:32 +0900 |
commit | dda5501e80cb98bbe119ac2f9fcf9b7049e121ce (patch) | |
tree | d56d3c35cd554729654a64a5ee692fa1681e88c3 /activerecord/lib/active_record | |
parent | 357aa83f84695a31328b17be4080f8ab4993fcb8 (diff) | |
download | rails-dda5501e80cb98bbe119ac2f9fcf9b7049e121ce.tar.gz rails-dda5501e80cb98bbe119ac2f9fcf9b7049e121ce.tar.bz2 rails-dda5501e80cb98bbe119ac2f9fcf9b7049e121ce.zip |
Enable SQL statement cache for `find` on base class as with `find_by`
Related and follows d333d85254d27cd572e6ecce8ee850c107a4f340.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 18cfac1f2f..eb4b48bc37 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -161,7 +161,7 @@ module ActiveRecord return super if block_given? || primary_key.nil? || scope_attributes? || - columns_hash.include?(inheritance_column) + columns_hash.key?(inheritance_column) && !base_class? id = ids.first |