aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-05-13 14:54:12 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-06-11 16:54:14 -0300
commit7db63f3d35577e457250ba68d7a77651b2feb362 (patch)
tree5b9cec0b5c5657c460454fd71fcc4cd49fa30ee4
parent11c71b207e11e6a94b65f5e480845ecc3a06de0d (diff)
downloadrails-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.rb8
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
#