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:
parent
2b0c602bc3
commit
57f5b00ba4
9 changed files with 7 additions and 8 deletions
|
@ -1 +0,0 @@
|
|||
Edit world!
|
|
@ -1 +0,0 @@
|
|||
New world!
|
|
@ -1 +0,0 @@
|
|||
<content>I should not be displayed</content>
|
|
@ -1 +0,0 @@
|
|||
<customer-name><%= @customer.name %></customer-name>
|
|
@ -1 +0,0 @@
|
|||
alert("Hi");
|
|
@ -1 +0,0 @@
|
|||
Hello world!
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue