This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user