mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-25 12:01:03 +00:00
Fixing ban scopes for new syntax
This commit is contained in:
parent
efcaab5a86
commit
9252200dc0
1 changed files with 3 additions and 3 deletions
|
@ -28,9 +28,9 @@ class Ban < ActiveRecord::Base
|
|||
|
||||
attr_accessor :len, :user_name
|
||||
|
||||
scope :ordered, order: "created_at DESC"
|
||||
scope :effective, conditions: "expiry > UTC_TIMESTAMP()"
|
||||
scope :ineffective, conditions: "expiry < UTC_TIMESTAMP()"
|
||||
scope :ordered, -> { order(created_at: :desc ) }
|
||||
scope :effective, -> { where("expiry > UTC_TIMESTAMP()") }
|
||||
scope :ineffective, -> { where("expiry < UTC_TIMESTAMP()") }
|
||||
|
||||
before_validation :check_user
|
||||
|
||||
|
|
Loading…
Reference in a new issue