diff options
author | Tute Costa <tutecosta@gmail.com> | 2013-06-17 18:31:01 +0200 |
---|---|---|
committer | Tute Costa <tutecosta@gmail.com> | 2013-06-18 10:26:38 +0200 |
commit | cdc4df79e127e6adacde648958462758fd6b1041 (patch) | |
tree | 26227560657ebae65582b451db371d8be3aed373 /actionpack | |
parent | 7324624f748b9717a5f9757ca89d791563ac5f95 (diff) | |
download | rails-cdc4df79e127e6adacde648958462758fd6b1041.tar.gz rails-cdc4df79e127e6adacde648958462758fd6b1041.tar.bz2 rails-cdc4df79e127e6adacde648958462758fd6b1041.zip |
Add `respond_with` `location` option to the docs
Diffstat (limited to 'actionpack')
-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]) |