0004-Fix-Subclasses-must-implement-a-find_templates-name-.patch

Marius BALTEANU, 2021-03-30 18:41

Download (1.13 KB)

View differences:

config/initializers/10-patches.rb
53 53

  
54 54
  class Resolver
55 55
    def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[])
56
      locals = locals.map(&:to_s).sort!.freeze
57

  
56 58
      cached(key, [name, prefix, partial], details, locals) do
57 59
        if (details[:formats] & [:xml, :json]).any?
58 60
          details = details.dup
59 61
          details[:formats] = details[:formats].dup + [:api]
60 62
        end
61
        find_templates(name, prefix, partial, details)
63
        _find_all(name, prefix, partial, details, key, locals)
62 64
      end
63 65
    end
64 66
  end
65
-