diff options
author | Cagdas Gerede <Earth@BlueSky> | 2016-11-12 11:16:07 +0300 |
---|---|---|
committer | Cagdas Gerede <Earth@BlueSky> | 2016-11-12 11:16:07 +0300 |
commit | 3b91c927195c19959afe008735a0c8f116c27826 (patch) | |
tree | 628db5edfefca12a9d3dd5edfb4c175805141d0e /app/controllers/projects/forks_controller.rb | |
parent | 4acedecc7b7ba2fe0ba76464019aeaca2984655d (diff) |
Replace conditional with a guard statement.
Diffstat (limited to 'app/controllers/projects/forks_controller.rb')
-rw-r--r-- | app/controllers/projects/forks_controller.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/projects/forks_controller.rb b/app/controllers/projects/forks_controller.rb index 358478f90cb..6892fea6eec 100644 --- a/app/controllers/projects/forks_controller.rb +++ b/app/controllers/projects/forks_controller.rb @@ -29,12 +29,9 @@ class Projects::ForksController < Projects::ApplicationController end def new - if current_user.nil? - authenticate_user! - else - @namespaces = current_user.manageable_namespaces - @namespaces.delete(@project.namespace) - end + return authenticate_user! unless current_user + @namespaces = current_user.manageable_namespaces + @namespaces.delete(@project.namespace) end def create |