Revision d575926a
Added by Alon Goldboim almost 9 years ago
app/controllers/api/base_controller.rb | ||
---|---|---|
end
|
||
|
||
def process_success(response = nil)
|
||
render_status = request.post? ? :created : :ok
|
||
response ||= get_resource
|
||
respond_with response, :responder => ApiResponder
|
||
respond_with response, :responder => ApiResponder, :status => render_status
|
||
end
|
||
|
||
def process_response(condition, response = nil)
|
Also available in: Unified diff
Fixes #10356 - changed the POST/PUT RABL template to be the same as the GET template
HTTP response code standardized to 201 on create.