mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:19:52 +01:00
6 lines
193 B
Ruby
6 lines
193 B
Ruby
class UserBan < ApplicationRecord
|
|
belongs_to :user
|
|
belongs_to :banned_by, class_name: 'User', optional: true
|
|
|
|
scope :current, -> { where('expires_at IS NULL or expires_at > NOW()') }
|
|
end
|