Replace conditional with a guard statement.
This commit is contained in:
parent
4acedecc7b
commit
3b91c92719
1 changed files with 3 additions and 6 deletions
|
@ -29,12 +29,9 @@ class Projects::ForksController < Projects::ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
if current_user.nil?
|
return authenticate_user! unless current_user
|
||||||
authenticate_user!
|
@namespaces = current_user.manageable_namespaces
|
||||||
else
|
@namespaces.delete(@project.namespace)
|
||||||
@namespaces = current_user.manageable_namespaces
|
|
||||||
@namespaces.delete(@project.namespace)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
Loading…
Reference in a new issue