Permalink
Browse files

Add `respond_with` `location` option to the docs

  • Loading branch information...
1 parent 7324624 commit cdc4df79e127e6adacde648958462758fd6b1041 @tute tute committed Jun 17, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 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])

0 comments on commit cdc4df7

Please sign in to comment.