diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-06-18 01:36:52 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-06-18 01:36:52 -0700 |
commit | 37e6201eeb6994f4b1917c017f13ae1b51a1292d (patch) | |
tree | 26227560657ebae65582b451db371d8be3aed373 /actionpack/lib | |
parent | 7324624f748b9717a5f9757ca89d791563ac5f95 (diff) | |
parent | cdc4df79e127e6adacde648958462758fd6b1041 (diff) | |
download | rails-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/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/responder.rb | 8 |
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]) |