From cdc4df79e127e6adacde648958462758fd6b1041 Mon Sep 17 00:00:00 2001 From: Tute Costa Date: Mon, 17 Jun 2013 18:31:01 +0200 Subject: Add `respond_with` `location` option to the docs --- actionpack/lib/action_controller/metal/responder.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb index 891819968b..734ccfc719 100644 --- a/actionpack/lib/action_controller/metal/responder.rb +++ b/actionpack/lib/action_controller/metal/responder.rb @@ -97,8 +97,12 @@ module ActionController #:nodoc: # # This will return status 201 if the task was saved successfully. If not, # it will simply ignore the given options and return status 422 and the - # resource errors. To customize the failure scenario, you can pass a - # a block to respond_with: + # resource errors. You can also override the location to redirect to: + # + # respond_with(@project, location: root_path) + # + # To customize the failure scenario, you can pass a a block to + # respond_with: # # def create # @project = Project.find(params[:project_id]) -- cgit v1.2.3