Skip to content

Commit

Permalink
Add respond_with location option to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tute committed Jun 18, 2013
1 parent 7324624 commit cdc4df7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions actionpack/lib/action_controller/metal/responder.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ module ActionController #:nodoc:
# #
# This will return status 201 if the task was saved successfully. If not, # 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 # it will simply ignore the given options and return status 422 and the
# resource errors. To customize the failure scenario, you can pass a # resource errors. You can also override the location to redirect to:
# a block to <code>respond_with</code>: #
# respond_with(@project, location: root_path)
#
# To customize the failure scenario, you can pass a a block to
# <code>respond_with</code>:
# #
# def create # def create
# @project = Project.find(params[:project_id]) # @project = Project.find(params[:project_id])
Expand Down

0 comments on commit cdc4df7

Please sign in to comment.