Models Refactoring: Move methods to roles

This commit is contained in:
Dmitriy Zaporozhets 2012-06-07 15:44:57 +03:00
parent 98b8416647
commit 0a70aca3b1
20 changed files with 531 additions and 524 deletions

View file

@ -1,4 +1,6 @@
class Event < ActiveRecord::Base
include PushEvent
default_scope where("author_id IS NOT NULL")
Created = 1
@ -9,8 +11,6 @@ class Event < ActiveRecord::Base
Commented = 6
Merged = 7
does "event/push"
belongs_to :project
belongs_to :target, :polymorphic => true