diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-05-13 14:54:12 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:14 -0300 |
commit | 7db63f3d35577e457250ba68d7a77651b2feb362 (patch) | |
tree | 5b9cec0b5c5657c460454fd71fcc4cd49fa30ee4 | |
parent | 11c71b207e11e6a94b65f5e480845ecc3a06de0d (diff) | |
download | rails-7db63f3d35577e457250ba68d7a77651b2feb362.tar.gz rails-7db63f3d35577e457250ba68d7a77651b2feb362.tar.bz2 rails-7db63f3d35577e457250ba68d7a77651b2feb362.zip |
Fix MimeResponds example in AC::API documentation
-rw-r--r-- | actionpack/lib/action_controller/api.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/api.rb b/actionpack/lib/action_controller/api.rb index cb819067da..9dc96bd3e6 100644 --- a/actionpack/lib/action_controller/api.rb +++ b/actionpack/lib/action_controller/api.rb @@ -71,11 +71,13 @@ module ActionController # end # # class PostsController < ApplicationController - # respond_to :json, :xml - # # def index # @posts = Post.all - # respond_with @posts + # + # respond_to do |format| + # format.json { render json: @posts } + # format.xml { render xml: @posts } + # end # end # end # |