rename lambda references to use shorthand syntax

This commit is contained in:
Albert Yi
2018-05-10 11:18:02 -07:00
parent 320f1a426e
commit 72f319ccf3
27 changed files with 69 additions and 69 deletions

View File

@@ -19,9 +19,9 @@ class PostFlag < ApplicationRecord
before_save :update_post
attr_accessor :is_deletion
scope :by_users, lambda { where.not(creator: User.system) }
scope :by_system, lambda { where(creator: User.system) }
scope :in_cooldown, lambda { by_users.where("created_at >= ?", COOLDOWN_PERIOD.ago) }
scope :by_users, -> { where.not(creator: User.system) }
scope :by_system, -> { where(creator: User.system) }
scope :in_cooldown, -> { by_users.where("created_at >= ?", COOLDOWN_PERIOD.ago) }
module SearchMethods
def reason_matches(query)