mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 14:46:05 +10:00
This controller is now the target for `root_url`. It sub-classes DashboardController so we can render the old default without a redirect if the user hasn't customized their dashboard location. cherry-picked
19 lines
535 B
Ruby
19 lines
535 B
Ruby
# 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
|