Welcome to mirror list, hosted at ThFree Co, Russian Federation.

root_controller.rb « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7606d2d0fbea82c6910762bfb3dee404a297b50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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.
class RootController < DashboardController
  def show
    case current_user.try(:dashboard)
    when 'stars'
      redirect_to starred_dashboard_projects_path
    else
      super
    end
  end
end