mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Fix Rails/WhereRange cop (#30343)
This commit is contained in:
@@ -4,7 +4,7 @@ module Expireable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
scope :expired, -> { where.not(expires_at: nil).where('expires_at < ?', Time.now.utc) }
|
||||
scope :expired, -> { where.not(expires_at: nil).where(expires_at: ...Time.now.utc) }
|
||||
|
||||
def expires_in
|
||||
return @expires_in if defined?(@expires_in)
|
||||
|
||||
Reference in New Issue
Block a user