aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
#