Displaying 1 result from an estimated 1 matches for "render_good".
Did you mean:
render_book
2012 Nov 29
3
Proposal: faragment cache with :if / :unless conditions
...tself.
This is technically not the same in terms of performance gain (not all
computations inside the main partial would be cached) and it would probably
be more clean to have something like this (trivialized):
<%= cache(@model, unless: content_cachable?(@model)) do %>
<% if @model.render_good? %>
<%= render ''good_one'' %>
<% else %>
<%= render ''bad_one'' %>
<% end %>
... other tens of similar conditions
<% end %>
This may reveal some bad partial design I''m facing, but I''m curious to...