diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-22 00:02:00 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-22 00:02:00 +0300 |
commit | 3f574c4db958f2d1ea4d6475cb027dc005fbae87 (patch) | |
tree | 497aea7966167dd3c228529afd572bb25bb37f74 /app/controllers/concerns | |
parent | c0ce49861510e73194760a4251858437abaedc03 (diff) |
Use compact syntax
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/filter_projects.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/concerns/filter_projects.rb b/app/controllers/concerns/filter_projects.rb index 091412a7c93..586f97c5eb4 100644 --- a/app/controllers/concerns/filter_projects.rb +++ b/app/controllers/concerns/filter_projects.rb @@ -10,10 +10,7 @@ module FilterProjects def filter_projects(projects) projects = projects.search(params[:filter_projects]) if params[:filter_projects].present? projects = projects.non_archived if params[:archived].blank? - - if params[:personal].present? and current_user - projects = projects.personal(current_user) - end + projects = projects.personal(current_user) if params[:personal].present? && current_user projects end |