Class: RootController

Inherits:
Dashboard::ProjectsController
  • Object
show all
Defined in:
app/controllers/root_controller.rb

Overview

RootController

This controller exists solely to handle requests to `root_url`. When a user is logged in and has customized their `dashboard` setting, they will be redirected to their preferred location.

For users who haven't customized the setting, we simply delegate to `DashboardController#show`, which is the default.

Instance Method Summary collapse

Instance Method Details

#indexObject


22
23
24
25
26
27
28
# File 'app/controllers/root_controller.rb', line 22

def index
  # n+1: https://gitlab.com/gitlab-org/gitlab-foss/issues/40260
  Gitlab::GitalyClient.allow_n_plus_1_calls do
    projects
    super
  end
end