Permalink
Browse files

Merge remote-tracking branch 'docrails/master'

  • Loading branch information...
2 parents 784ed15 + 6a86873 commit 08b60fc2e57abc922e0ff53c27a322719e3490d6 @fxn fxn committed Feb 2, 2013
Showing with 5 additions and 5 deletions.
  1. +3 −3 guides/source/caching_with_rails.md
  2. +1 −1 guides/source/generators.md
  3. +1 −1 guides/source/plugins.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| %>
@@ -310,7 +310,7 @@ In Rails 3.0 and above, generators don't just look in the source root for templa
```erb
module <%= class_name %>Helper
- attr_reader :<%= plural_name %>, <%= plural_name.singularize %>
+ attr_reader :<%= plural_name %>, :<%= plural_name.singularize %>
end
```
@@ -86,7 +86,7 @@ Run `rake` to run the test. This test should fail because we haven't implemented
Great - now you are ready to start development.
-Then in `lib/yaffle.rb` require `lib/core_ext`:
+Then in `lib/yaffle.rb` add `require "yaffle/core_ext"`:
```ruby
# yaffle/lib/yaffle.rb

0 comments on commit 08b60fc

Please sign in to comment.