All scopes must be in lambdas
This commit is contained in:
parent
9a22ac63ec
commit
b5db541338
9 changed files with 22 additions and 22 deletions
|
@ -42,8 +42,8 @@ class Event < ActiveRecord::Base
|
|||
serialize :data
|
||||
|
||||
# Scopes
|
||||
scope :recent, order("created_at DESC")
|
||||
scope :code_push, where(action: Pushed)
|
||||
scope :recent, -> { order("created_at DESC") }
|
||||
scope :code_push, -> { where(action: Pushed) }
|
||||
scope :in_projects, ->(project_ids) { where(project_id: project_ids).recent }
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue