summaryrefslogtreecommitdiff
path: root/app/models/user_callout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user_callout.rb')
-rw-r--r--app/models/user_callout.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/user_callout.rb b/app/models/user_callout.rb
index 027ee44c6a9..82f82356cb4 100644
--- a/app/models/user_callout.rb
+++ b/app/models/user_callout.rb
@@ -12,4 +12,7 @@ class UserCallout < ApplicationRecord
presence: true,
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) }
end