This commit is contained in:
2026-05-04 15:42:17 +09:00
parent 7ab877d6bd
commit c1af29617f
3 changed files with 2 additions and 15 deletions
+1 -1
View File
@@ -5,6 +5,6 @@ class IpAddress < ApplicationRecord
has_many :users, through: :user_ips
def banned? = banned_at.present?
def ban! = banned? or update!(banned_at: Time.current)
def ban! = banned? || update!(banned_at: Time.current)
def unban! = update!(banned_at: nil)
end
+1 -1
View File
@@ -22,6 +22,6 @@ class User < ApplicationRecord
def gte_member? = member? || admin?
def banned? = banned_at.present?
def ban! = banned? or update!(banned_at: Time.current)
def ban! = banned? || update!(banned_at: Time.current)
def unban! = update!(banned_at: nil)
end