diff options
author | pluralcafe-docker <git@plural.cafe> | 2018-12-02 08:24:11 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2018-12-02 08:24:11 +0000 |
commit | ae737d94ac10284738928109c11f43aeecca8a0b (patch) | |
tree | ebe739f663d259e0f2aaf2e2f2984a8d0bc9cf1e /app/controllers/application_controller.rb | |
parent | 384a602fd4117a73338542c59985f54acf5fb3f8 (diff) | |
parent | 4b85bf12ab7005a5a6b4472b8aeaf022ce042ad7 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 983b116c9..0209805d0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -188,7 +188,7 @@ class ApplicationController < ActionController::Base klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!) unless uncached_ids.empty? - uncached = klass.where(id: uncached_ids).with_includes.map { |item| [item.id, item] }.to_h + uncached = klass.where(id: uncached_ids).with_includes.each_with_object({}) { |item, h| h[item.id] = item } uncached.each_value do |item| Rails.cache.write(item, item) |