aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/cache_helper.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-03-21 16:29:00 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-03-21 19:38:59 +0100
commit637bb726cac60aaa1f7e482836458aa73e17fbb7 (patch)
treec10ff03433e099d7767715923446a0a4dc0aff18 /actionview/lib/action_view/helpers/cache_helper.rb
parent4bca34750d718a6f7a9bacbe181460b4505c4ba7 (diff)
downloadrails-637bb726cac60aaa1f7e482836458aa73e17fbb7.tar.gz
rails-637bb726cac60aaa1f7e482836458aa73e17fbb7.tar.bz2
rails-637bb726cac60aaa1f7e482836458aa73e17fbb7.zip
Digestor should just rely on the finder to know about the format and the variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
Diffstat (limited to 'actionview/lib/action_view/helpers/cache_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/cache_helper.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb
index 3177d18c4d..d1c268ec40 100644
--- a/actionview/lib/action_view/helpers/cache_helper.rb
+++ b/actionview/lib/action_view/helpers/cache_helper.rb
@@ -165,20 +165,10 @@ module ActionView
def fragment_name_with_digest(name) #:nodoc:
if @virtual_path
- variant = request.variant.is_a?(Array) ? request.variant.first : request.variant
+ names = Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name)
+ digest = Digestor.digest name: @virtual_path, finder: lookup_context, dependencies: view_cache_dependencies
- options = {
- name: @virtual_path,
- format: formats.last.to_sym,
- variant: variant,
- finder: lookup_context,
- dependencies: view_cache_dependencies
- }
-
- names = Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name)
- digest = Digestor.digest(options)
-
- [*names, digest]
+ [ *names, digest ]
else
name
end