Constants in Events looks good now

This commit is contained in:
Andrew8xx8 2013-02-13 15:48:16 +04:00
parent b9f8b40190
commit 839957cf56
13 changed files with 43 additions and 43 deletions

View file

@ -103,7 +103,7 @@ class Project < ActiveRecord::Base
end
def with_push
includes(:events).where('events.action = ?', Event::Pushed)
includes(:events).where('events.action = ?', Event::PUSHED)
end
def active
@ -336,7 +336,7 @@ class Project < ActiveRecord::Base
def observe_push(data)
Event.create(
project: self,
action: Event::Pushed,
action: Event::PUSHED,
data: data,
author_id: data[:user_id]
)