From: Go MAEDA Date: Thu, 1 Apr 2021 14:46:15 +0000 (+0000) Subject: Fix Subclasses must implement a find_templates(name, prefix, partial, details, locals... X-Git-Tag: 5.0.0~476 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f1b1c2f4712e089d9a00310f24d54c672f707235;p=redmine.git Fix Subclasses must implement a find_templates(name, prefix, partial, details, locals = []) method (#29914). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20883 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 9af59563e..cc6113d48 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -53,12 +53,14 @@ module ActionView class Resolver def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[]) + locals = locals.map(&:to_s).sort!.freeze + cached(key, [name, prefix, partial], details, locals) do if (details[:formats] & [:xml, :json]).any? details = details.dup details[:formats] = details[:formats].dup + [:api] end - find_templates(name, prefix, partial, details) + _find_all(name, prefix, partial, details, key, locals) end end end