diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers/cache_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/cache_helper.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index 932a5fa65a..995aa10afb 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -120,9 +120,8 @@ module ActionView nil end - #Chache fragments of a view if +condition+ is true + # Cache fragments of a view if +condition+ is true # - #=== Example # <%= cache_if admin?, project do %> # <b>All the topics on this project</b> # <%= render project.topics %> @@ -137,8 +136,12 @@ module ActionView nil end - #Chache fragments of a view unless +condition+ is true - #(see +cache_if+ for a example) + # Cache fragments of a view unless +condition+ is true + # + # <%= cache_unless admin?, project do %> + # <b>All the topics on this project</b> + # <%= render project.topics %> + # <% end %> def cache_unless(condition, name = {}, options = nil, &block) cache_if !condition, name, options, &block end |