diff options
Diffstat (limited to 'app/models/ai/service_access_token.rb')
-rw-r--r-- | app/models/ai/service_access_token.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ai/service_access_token.rb b/app/models/ai/service_access_token.rb index 863bdfc7899..b8a2a271976 100644 --- a/app/models/ai/service_access_token.rb +++ b/app/models/ai/service_access_token.rb @@ -5,6 +5,7 @@ module Ai self.table_name = 'service_access_tokens' scope :expired, -> { where('expires_at < :now', now: Time.current) } + scope :active, -> { where('expires_at > :now', now: Time.current) } scope :for_category, ->(category) { where(category: category) } attr_encrypted :token, |