From 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 28 Feb 2019 19:57:34 +0100 Subject: Ran standardrb --fix on the whole codebase Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_. --- app/controllers/root_controller.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'app/controllers/root_controller.rb') diff --git a/app/controllers/root_controller.rb b/app/controllers/root_controller.rb index 7b6657e1196..304dacfcc98 100644 --- a/app/controllers/root_controller.rb +++ b/app/controllers/root_controller.rb @@ -33,20 +33,20 @@ class RootController < Dashboard::ProjectsController def redirect_logged_user case current_user.dashboard - when 'stars' + when "stars" flash.keep redirect_to(starred_dashboard_projects_path) - when 'project_activity' + when "project_activity" redirect_to(activity_dashboard_path) - when 'starred_project_activity' - redirect_to(activity_dashboard_path(filter: 'starred')) - when 'groups' + when "starred_project_activity" + redirect_to(activity_dashboard_path(filter: "starred")) + when "groups" redirect_to(dashboard_groups_path) - when 'todos' + when "todos" redirect_to(dashboard_todos_path) - when 'issues' + when "issues" redirect_to(issues_dashboard_path(assignee_username: current_user.username)) - when 'merge_requests' + when "merge_requests" redirect_to(merge_requests_dashboard_path(assignee_username: current_user.username)) end end @@ -56,8 +56,8 @@ class RootController < Dashboard::ProjectsController # Don't redirect to the default URL to prevent endless redirections return false unless Gitlab::CurrentSettings.home_page_url.present? - home_page_url = Gitlab::CurrentSettings.home_page_url.chomp('/') - root_urls = [Gitlab.config.gitlab['url'].chomp('/'), root_url.chomp('/')] + home_page_url = Gitlab::CurrentSettings.home_page_url.chomp("/") + root_urls = [Gitlab.config.gitlab["url"].chomp("/"), root_url.chomp("/")] root_urls.exclude?(home_page_url) end -- cgit v1.2.1