diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2014-08-16 17:04:26 -0400 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2014-08-17 13:20:23 -0400 |
commit | 57f5b00ba4f675873d5bab3bc88dae55d4fe7857 (patch) | |
tree | 66e0eb4b506ad92b8ee3c03fc2a8a57f8ed6a8b3 /guides | |
parent | 2b0c602bc3dd2928b8a77465f305c765dbb447e5 (diff) | |
download | rails-57f5b00ba4f675873d5bab3bc88dae55d4fe7857.tar.gz rails-57f5b00ba4f675873d5bab3bc88dae55d4fe7857.tar.bz2 rails-57f5b00ba4f675873d5bab3bc88dae55d4fe7857.zip |
Remove more references to respond_with
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/caching_with_rails.md | 7 | ||||
-rw-r--r-- | guides/source/contributing_to_ruby_on_rails.md | 2 |
2 files changed, 7 insertions, 2 deletions
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 |