summaryrefslogtreecommitdiff
path: root/app/helpers/user_callouts_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 18:08:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 18:08:54 +0000
commit0d6fa033121a9bef708b8f2de186c4034c61d4a3 (patch)
tree851d65a09efbffa114c9a273e590d55cfb1436ab /app/helpers/user_callouts_helper.rb
parent0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (diff)
downloadgitlab-ce-0d6fa033121a9bef708b8f2de186c4034c61d4a3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/user_callouts_helper.rb')
-rw-r--r--app/helpers/user_callouts_helper.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb
index b3eee25674b..ab691916706 100644
--- a/app/helpers/user_callouts_helper.rb
+++ b/app/helpers/user_callouts_helper.rb
@@ -22,6 +22,9 @@ module UserCalloutsHelper
def render_dashboard_gold_trial(user)
end
+ def render_account_recovery_regular_check
+ end
+
def show_suggest_popover?
!user_dismissed?(SUGGEST_POPOVER_DISMISSED)
end
@@ -32,8 +35,10 @@ module UserCalloutsHelper
private
- def user_dismissed?(feature_name)
- current_user&.callouts&.find_by(feature_name: UserCallout.feature_names[feature_name])
+ def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil)
+ return false unless current_user
+
+ current_user.dismissed_callout?(feature_name: feature_name, ignore_dismissal_earlier_than: ignore_dismissal_earlier_than)
end
end