diff options
author | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-08-28 15:31:54 +1000 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@publicisfrontfoot.com.au> | 2015-08-28 17:26:09 +1000 |
commit | a9c6a583b6ed4b6482652f98c2aeda1a60268fc9 (patch) | |
tree | ca19b76ec44c64a52d95e4ee5a60a75f09a61935 /actionview/lib/action_view | |
parent | 93a4dfaebc48e3324997be780539fad996349c84 (diff) | |
download | rails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.tar.gz rails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.tar.bz2 rails-a9c6a583b6ed4b6482652f98c2aeda1a60268fc9.zip |
Fix calling cache helper with a relation
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 |