diff options
Diffstat (limited to 'app/models/user_callout.rb')
-rw-r--r-- | app/models/user_callout.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/user_callout.rb b/app/models/user_callout.rb index bb5a9dceaeb..0a4db707be6 100644 --- a/app/models/user_callout.rb +++ b/app/models/user_callout.rb @@ -17,7 +17,7 @@ class UserCallout < ApplicationRecord threat_monitoring_info: 11, # EE-only account_recovery_regular_check: 12, # EE-only webhooks_moved: 13, - service_templates_deprecated: 14, + service_templates_deprecated_callout: 14, admin_integrations_moved: 15, web_ide_alert_dismissed: 16, # no longer in use active_user_count_threshold: 18, # EE-only @@ -29,7 +29,8 @@ class UserCallout < ApplicationRecord registration_enabled_callout: 25, new_user_signups_cap_reached: 26, # EE-only unfinished_tag_cleanup_callout: 27, - eoa_bronze_plan_banner: 28 # EE-only + eoa_bronze_plan_banner: 28, # EE-only + pipeline_needs_banner: 29 } validates :user, presence: true @@ -38,6 +39,7 @@ class UserCallout < ApplicationRecord uniqueness: { scope: :user_id }, inclusion: { in: UserCallout.feature_names.keys } - scope :with_feature_name, -> (feature_name) { where(feature_name: UserCallout.feature_names[feature_name]) } - scope :with_dismissed_after, -> (dismissed_after) { where('dismissed_at > ?', dismissed_after) } + def dismissed_after?(dismissed_after) + dismissed_at > dismissed_after + end end |