Dynamic partials and cache_digests

I have the following code in my contact / preview list:

= render :partial => @contactsheet.choose_partial.first

      

select_template is a function to select the correct partial. select_partial () returns an array with one element (partial name). It works fine. Now, I want to use cache_digests for this partial, I have added the cache code in the partial.

But when I run the rake task rake cache_digests:nested_dependencies TEMPLATE=contactsheets/preview

to get the dependencies, it outputs

[
  "contactsheets/@contactsheet.choose_template.first"
]

      

The expression is not evaluated and the dependency is incorrect. How to fix this dependency?

+3


source to share





All Articles