Skip to content
This repository
Browse code

Add `respond_with` `location` option to the docs

  • Loading branch information...
commit cdc4df79e127e6adacde648958462758fd6b1041 1 parent 7324624
Tute Costa tute authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 actionpack/lib/action_controller/metal/responder.rb
8 actionpack/lib/action_controller/metal/responder.rb
@@ -97,8 +97,12 @@ module ActionController #:nodoc:
97 97 #
98 98 # This will return status 201 if the task was saved successfully. If not,
99 99 # it will simply ignore the given options and return status 422 and the
100   - # resource errors. To customize the failure scenario, you can pass a
101   - # a block to <code>respond_with</code>:
  100 + # resource errors. You can also override the location to redirect to:
  101 + #
  102 + # respond_with(@project, location: root_path)
  103 + #
  104 + # To customize the failure scenario, you can pass a a block to
  105 + # <code>respond_with</code>:
102 106 #
103 107 # def create
104 108 # @project = Project.find(params[:project_id])

0 comments on commit cdc4df7

Please sign in to comment.
Something went wrong with that request. Please try again.