1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove more references to respond_with

This commit is contained in:
José Valim 2014-08-16 17:04:26 -04:00
parent 2b0c602bc3
commit 57f5b00ba4
9 changed files with 7 additions and 8 deletions

View file

@ -1 +0,0 @@
Edit world!

View file

@ -1 +0,0 @@
New world!

View file

@ -1 +0,0 @@
<content>I should not be displayed</content>

View file

@ -1 +0,0 @@
<customer-name><%= @customer.name %></customer-name>

View file

@ -1 +0,0 @@
alert("Hi");

View file

@ -1 +0,0 @@
Hello world!

View file

@ -353,7 +353,12 @@ Instead of an options hash, you can also simply pass in a model, Rails will use
class ProductsController < ApplicationController class ProductsController < ApplicationController
def show def show
@product = Product.find(params[:id]) @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
end end
``` ```

View file

@ -397,7 +397,7 @@ inside, just indent it with 4 spaces:
class ArticlesController class ArticlesController
def index def index
respond_with Article.limit(10) render json: Article.limit(10)
end end
end end