From 2ba1670f378242438665b43819e41b31ca856bcc Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 17 Aug 2014 22:42:03 +0900 Subject: [ci skip] Fix sample code in Layouts and Rendering guide --- guides/source/layouts_and_rendering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md index f00f7bca1b..8b37b92139 100644 --- a/guides/source/layouts_and_rendering.md +++ b/guides/source/layouts_and_rendering.md @@ -903,7 +903,7 @@ You can also specify multiple videos to play by passing an array of videos to th This will produce: ```erb - + ``` #### Linking to Audio Files with the `audio_tag` -- cgit v1.2.3 From 57f5b00ba4f675873d5bab3bc88dae55d4fe7857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 16 Aug 2014 17:04:26 -0400 Subject: Remove more references to respond_with --- guides/source/caching_with_rails.md | 7 ++++++- guides/source/contributing_to_ruby_on_rails.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'guides') diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index 0902e347e2..d0f3a596fe 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -353,7 +353,12 @@ Instead of an options hash, you can also simply pass in a model, Rails will use class ProductsController < ApplicationController def show @product = Product.find(params[:id]) - respond_with(@product) if stale?(@product) + + if stale?(@product) + respond_to do |wants| + # ... normal response processing + end + end end end ``` diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index 0b05725623..8bc4b10591 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -397,7 +397,7 @@ inside, just indent it with 4 spaces: class ArticlesController def index - respond_with Article.limit(10) + render json: Article.limit(10) end end -- cgit v1.2.3