|
|
@ -29,6 +29,7 @@ class DomainBlock < ApplicationRecord |
|
|
|
|
|
|
|
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } |
|
|
|
scope :with_user_facing_limitations, -> { where(severity: [:silence, :suspend]) } |
|
|
|
scope :with_limitations, -> { where(severity: [:silence, :suspend]).or(where(reject_media: true)) } |
|
|
|
scope :by_severity, -> { order(Arel.sql('(CASE severity WHEN 0 THEN 1 WHEN 1 THEN 2 WHEN 2 THEN 0 END), domain')) } |
|
|
|
|
|
|
|
def to_log_human_identifier |
|
|
|