diff options
author | Nicholas Schultz-Møller <nicholassm@gmail.com> | 2013-01-31 15:11:18 +0100 |
---|---|---|
committer | Nicholas Schultz-Møller <nicholassm@gmail.com> | 2013-01-31 15:11:18 +0100 |
commit | 26db079f94a12f03e64a31acf6b584b333c3d687 (patch) | |
tree | cb63eae44e2aec814587540f2eb9a296e0cf76d2 /guides | |
parent | f409e0519f3532ddc8dff818546e7e3c02668b1d (diff) | |
download | rails-26db079f94a12f03e64a31acf6b584b333c3d687.tar.gz rails-26db079f94a12f03e64a31acf6b584b333c3d687.tar.bz2 rails-26db079f94a12f03e64a31acf6b584b333c3d687.zip |
Fix formatting: ruby->erb. [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/caching_with_rails.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index e52264f296..a270ec7a7e 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -99,14 +99,14 @@ end This method generates a cache key that depends on all products and can be used in the view: -```ruby +```erb <% cache(cache_key_for_products) do %> All available products: <% end %> ``` You can also use an Active Record model as the cache key: -```ruby +```erb <% Product.all.each do |p| %> <% cache(p) do %> <%= link_to p.name, product_url(p) %> @@ -118,7 +118,7 @@ Behind the scenes, a method called `cache_key` will be invoked on the model and You can also combine the two schemes which is called "Russian Doll Caching": -```ruby +```erb <% cache(cache_key_for_products) do %> All available products: <% Product.all.each do |p| %> |