aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-06-18 01:36:52 -0700
committerYves Senn <yves.senn@gmail.com>2013-06-18 01:36:52 -0700
commit37e6201eeb6994f4b1917c017f13ae1b51a1292d (patch)
tree26227560657ebae65582b451db371d8be3aed373 /actionpack
parent7324624f748b9717a5f9757ca89d791563ac5f95 (diff)
parentcdc4df79e127e6adacde648958462758fd6b1041 (diff)
downloadrails-37e6201eeb6994f4b1917c017f13ae1b51a1292d.tar.gz
rails-37e6201eeb6994f4b1917c017f13ae1b51a1292d.tar.bz2
rails-37e6201eeb6994f4b1917c017f13ae1b51a1292d.zip
Merge pull request #10988 from tute/master
Add respond_with location option to docs Edit
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/responder.rb8
1 files changed, 6 insertions, 2 deletions
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 <code>respond_with</code>:
+ # 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
+ # <code>respond_with</code>:
#
# def create
# @project = Project.find(params[:project_id])