Models Refactoring: Move methods to roles
This commit is contained in:
parent
98b8416647
commit
0a70aca3b1
20 changed files with 531 additions and 524 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue