diff options
author | John Hawthorn <john@hawthorn.email> | 2019-04-12 10:20:04 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-04-12 12:30:26 -0700 |
commit | 53e4055a75fc16bf31aeb295ec18c07a3059db57 (patch) | |
tree | e4937fa650c63a7e54bd5d01914459c7ae7d2dd3 /actionview/lib/action_view/testing/resolvers.rb | |
parent | 1fc735e5f584b481eba85670c519731271ac1796 (diff) | |
download | rails-53e4055a75fc16bf31aeb295ec18c07a3059db57.tar.gz rails-53e4055a75fc16bf31aeb295ec18c07a3059db57.tar.bz2 rails-53e4055a75fc16bf31aeb295ec18c07a3059db57.zip |
Support disabling cache for Digestor
This adds a bit of complexity, but is necessary for now to avoid holding
extra copies of templates which are resolved from ActionView::Digestor
after disabling cache on the lookup context.
Diffstat (limited to 'actionview/lib/action_view/testing/resolvers.rb')
-rw-r--r-- | actionview/lib/action_view/testing/resolvers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index a97fb71b26..1bedf44934 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -23,7 +23,7 @@ module ActionView #:nodoc: private - def query(path, exts, _, locals) + def query(path, exts, _, locals, cache:) query = +"" EXTENSIONS.each do |ext, prefix| query << "(" << exts[ext].map { |e| e && Regexp.escape("#{prefix}#{e}") }.join("|") << "|)" @@ -47,7 +47,7 @@ module ActionView #:nodoc: end class NullResolver < PathResolver - def query(path, exts, _, locals) + def query(path, exts, _, locals, cache:) handler, format, variant = extract_handler_and_format_and_variant(path) [ActionView::Template.new("Template generated by Null Resolver", path.virtual, handler, virtual_path: path.virtual, format: format, variant: variant, locals: locals)] end |