Commit 174847b4 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Replace case with the guard clause

parent d60243ed
......@@ -40,14 +40,9 @@ module Projects
end
def response_status(result)
case result.http_status
when 401
:unauthorized
when 403
:forbidden
else
:ok
end
return :ok if result.success?
result.http_status
end
def permitted_params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment