diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-01 02:16:42 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-01 02:16:42 -0300 |
commit | 78f5b167610a1da4171b52e5c86a35a236f2b7b6 (patch) | |
tree | 35bd06a7e460a19139395232bf2132928a48323f /actionview/lib/action_view | |
parent | c47c1d206e87a6602300fc81d3094e1af01dc728 (diff) | |
parent | a9c6a583b6ed4b6482652f98c2aeda1a60268fc9 (diff) | |
download | rails-78f5b167610a1da4171b52e5c86a35a236f2b7b6.tar.gz rails-78f5b167610a1da4171b52e5c86a35a236f2b7b6.tar.bz2 rails-78f5b167610a1da4171b52e5c86a35a236f2b7b6.zip |
Merge pull request #21416 from lsylvester/cache-helper-with-relation
cache helper with relation not working as expected
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index 636d7d4cc3..e473aeaea9 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -229,10 +229,9 @@ module ActionView def fragment_name_with_digest(name, virtual_path) #:nodoc: virtual_path ||= @virtual_path if virtual_path - names = Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name) + name = controller.url_for(name).split("://").last if name.is_a?(Hash) digest = Digestor.digest name: virtual_path, finder: lookup_context, dependencies: view_cache_dependencies - - [ *names, digest ] + [ name, digest ] else name end |