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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/onboarding_progress.rb')
-rw-r--r--app/models/onboarding_progress.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/onboarding_progress.rb b/app/models/onboarding_progress.rb
index 8a444f8934e..fb627d1b67e 100644
--- a/app/models/onboarding_progress.rb
+++ b/app/models/onboarding_progress.rb
@@ -66,6 +66,13 @@ class OnboardingProgress < ApplicationRecord
where(namespace: namespace).where.not(action_column => nil).exists?
end
+ def not_completed?(namespace_id, action)
+ return unless ACTIONS.include?(action)
+
+ action_column = column_name(action)
+ where(namespace_id: namespace_id).where(action_column => nil).exists?
+ end
+
def column_name(action)
:"#{action}_at"
end