summaryrefslogtreecommitdiff
path: root/app/controllers/root_controller.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /app/controllers/root_controller.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
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_.
Diffstat (limited to 'app/controllers/root_controller.rb')
-rw-r--r--app/controllers/root_controller.rb20
1 files changed, 10 insertions, 10 deletions
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