From 7db63f3d35577e457250ba68d7a77651b2feb362 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 13 May 2015 14:54:12 -0300 Subject: [PATCH] Fix MimeResponds example in AC::API documentation --- actionpack/lib/action_controller/api.rb | 8 +++++--- 1 file 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 # -- GitLab