lib/cuba_api/response_status.rb in cuba-api-0.3.2 vs lib/cuba_api/response_status.rb in cuba-api-0.3.3
- old
+ new
@@ -6,10 +6,10 @@
res.status = 412 # Precondition Failed
obj = obj.errors
elsif req.post?
res.status = 201 # Created
if obj.respond_to?( :id ) && ! res[ 'Location' ]
- res[ 'Location' ] = env[ 'SCRIPT_NAME' ].to_s+ "/#{obj.id}"
+ res[ 'Location' ] = env[ 'SCRIPT_NAME' ].to_s + "/#{obj.id}"
end
elsif req.delete?
res.status = 204 # No Content
obj = ''
end