aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-12-23 16:06:53 +0330
committerRizwan Reza <rizwanreza@gmail.com>2010-12-23 16:06:53 +0330
commit5fb2f0c07f0e30adc2b3a6d2a1fab896ee9739b8 (patch)
tree173510a0d9e3ac81ae34fa0a84d375c5f48c5c47 /actionpack/lib/action_view
parent890105f4f1ca471491c85f2aabd21d5a183ab189 (diff)
downloadrails-5fb2f0c07f0e30adc2b3a6d2a1fab896ee9739b8.tar.gz
rails-5fb2f0c07f0e30adc2b3a6d2a1fab896ee9739b8.tar.bz2
rails-5fb2f0c07f0e30adc2b3a6d2a1fab896ee9739b8.zip
Revised documentation for cache_helper.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/cache_helper.rb22
1 files changed, 10 insertions, 12 deletions
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb
index f544a9d147..f41a16a61e 100644
--- a/actionpack/lib/action_view/helpers/cache_helper.rb
+++ b/actionpack/lib/action_view/helpers/cache_helper.rb
@@ -2,31 +2,29 @@ module ActionView
# = Action View Cache Helper
module Helpers
module CacheHelper
- # This helper to exposes a method for caching of view fragments.
- # See ActionController::Caching::Fragments for usage instructions.
+ # This helper exposes a method for caching view fragments caching
+ # fragments of a view rather than an entire action or page. This
+ # technique is useful caching pieces like menus, lists of news
+ # topics, static HTML fragments, and so on. This method takes a
+ # block that contains the content you wish to cache.
#
- # A method for caching fragments of a view rather than an entire
- # action or page. This technique is useful caching pieces like
- # menus, lists of news topics, static HTML fragments, and so on.
- # This method takes a block that contains the content you wish
- # to cache. See ActionController::Caching::Fragments for more
- # information.
+ # See ActionController::Caching::Fragments for usage instructions.
#
# ==== Examples
- # If you wanted to cache a navigation menu, you could do the
- # following.
+ # If you want to cache a navigation menu, you can do following:
#
# <% cache do %>
# <%= render :partial => "menu" %>
# <% end %>
#
- # You can also cache static content...
+ # You can also cache static content:
#
# <% cache do %>
# <p>Hello users! Welcome to our website!</p>
# <% end %>
#
- # ...and static content mixed with RHTML content.
+ # Static content with embedded ruby content can be cached as
+ # well:
#
# <% cache do %>
# Topics: