diff options
-rw-r--r-- | app/helpers/dashboard_helper.rb | 6 | ||||
-rw-r--r-- | ee/app/views/shared/_gold_trial_callout.html.haml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index 267ccbd8c5d..31551fba862 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -22,9 +22,9 @@ module DashboardHelper def controller_action_to_child_dashboards(controller = controller_name, action = action_name) case "#{controller}##{action}" when 'projects#index', 'root#index', 'projects#starred', 'projects#trending' - %w(projects, 'stars) + %w(projects stars) when 'dashboard#activity' - %w(starred_project_activity, 'project_activity) + %w(starred_project_activity project_activity) when 'groups#index' %w(groups) when 'todos#index' @@ -38,7 +38,7 @@ module DashboardHelper end end - def is_default_dashboard?(user = current_user) + def user_default_dashboard?(user = current_user) controller_action_to_child_dashboards.any? {|dashboard| dashboard == user.dashboard } end diff --git a/ee/app/views/shared/_gold_trial_callout.html.haml b/ee/app/views/shared/_gold_trial_callout.html.haml index 300ff5634c3..d8e1adaf796 100644 --- a/ee/app/views/shared/_gold_trial_callout.html.haml +++ b/ee/app/views/shared/_gold_trial_callout.html.haml @@ -1,4 +1,4 @@ -- if show_gold_trial? && is_default_dashboard? +- if show_gold_trial? && user_default_dashboard? .pt-1.d-none.d-md-block{ class: container_class } .user-callout.promotion-callout.thin-callout.js-gold-trial-callout{ data: { uid: 'trial_callout_dismissed', feature_id: UserCalloutsHelper::GOLD_TRIAL, dismiss_endpoint: user_callouts_path } } .bordered-box.justify-content-left.align-items-center |