diff options
author | Xavier Noria <fxn@hashref.com> | 2013-02-02 10:33:19 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-02-02 10:33:19 +0100 |
commit | 08b60fc2e57abc922e0ff53c27a322719e3490d6 (patch) | |
tree | 2602bbbffcdd202771173afbbfe259217d6e3496 | |
parent | 784ed154c3d1d9b6e7f0202dcf10d76d938849b0 (diff) | |
parent | 6a8687355253744c747654d5647b5730ea6901fd (diff) | |
download | rails-08b60fc2e57abc922e0ff53c27a322719e3490d6.tar.gz rails-08b60fc2e57abc922e0ff53c27a322719e3490d6.tar.bz2 rails-08b60fc2e57abc922e0ff53c27a322719e3490d6.zip |
Merge remote-tracking branch 'docrails/master'
-rw-r--r-- | guides/source/caching_with_rails.md | 6 | ||||
-rw-r--r-- | guides/source/generators.md | 2 | ||||
-rw-r--r-- | guides/source/plugins.md | 2 |
3 files changed, 5 insertions, 5 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| %> diff --git a/guides/source/generators.md b/guides/source/generators.md index 8b91dfc5a5..1a08eb420a 100644 --- a/guides/source/generators.md +++ b/guides/source/generators.md @@ -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 ``` diff --git a/guides/source/plugins.md b/guides/source/plugins.md index f8f04c3c67..695f25f8a9 100644 --- a/guides/source/plugins.md +++ b/guides/source/plugins.md @@ -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 |