mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 19:50:56 +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
|
attr_accessor :len, :user_name
|
||||||
|
|
||||||
scope :ordered, order: "created_at DESC"
|
scope :ordered, -> { order(created_at: :desc ) }
|
||||||
scope :effective, conditions: "expiry > UTC_TIMESTAMP()"
|
scope :effective, -> { where("expiry > UTC_TIMESTAMP()") }
|
||||||
scope :ineffective, conditions: "expiry < UTC_TIMESTAMP()"
|
scope :ineffective, -> { where("expiry < UTC_TIMESTAMP()") }
|
||||||
|
|
||||||
before_validation :check_user
|
before_validation :check_user
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue