Commit 3b91c927 authored by Cagdas Gerede's avatar Cagdas Gerede

Replace conditional with a guard statement.

parent 4acedecc
...@@ -29,13 +29,10 @@ class Projects::ForksController < Projects::ApplicationController ...@@ -29,13 +29,10 @@ class Projects::ForksController < Projects::ApplicationController
end end
def new def new
if current_user.nil? return authenticate_user! unless current_user
authenticate_user!
else
@namespaces = current_user.manageable_namespaces @namespaces = current_user.manageable_namespaces
@namespaces.delete(@project.namespace) @namespaces.delete(@project.namespace)
end end
end
def create def create
namespace = Namespace.find(params[:namespace_key]) namespace = Namespace.find(params[:namespace_key])
......
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