From what I can tell, it is not possible to disable a fragment cache
block based on conditions. One use for this that comes to mind is to
not cache a particular fragment for admin users. Of course, I could
cache a version of the fragment specifically for admins
<% cache :admin => logged_in? && current_user.is_admin? do
-%>
What I''m thinking of looks like this on the surface
<% cache {}, :disabled => logged_in? && current_user.is_admin?
do -%>
and it wouldn''t be a big deal to implement. Only, I''m
wondering whether
there''s another way to achieve the same out of the box.
Michael
--
Michael Schuerig
mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org
http://www.schuerig.de/michael/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---