All scopes must be in lambdas

This commit is contained in:
Andrew8xx8 2013-02-12 11:16:45 +04:00
parent 9a22ac63ec
commit b5db541338
9 changed files with 22 additions and 22 deletions

View file

@ -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