Processing with note events. reformated dashboard for more events to handle

This commit is contained in:
Dmitriy Zaporozhets 2012-12-14 21:39:55 +02:00
parent 678e5355a3
commit f2db188dbe
8 changed files with 73 additions and 33 deletions

View file

@ -15,6 +15,7 @@
#
class Event < ActiveRecord::Base
include NoteEvent
include PushEvent
attr_accessible :project, :action, :data, :author_id, :project_id,
@ -58,12 +59,14 @@ class Event < ActiveRecord::Base
end
end
# Next events currently enabled for system
# - push
# - new issue
# - merge request
def allowed?
push? || issue? || merge_request? || membership_changed? || note? || milestone?
def proper?
if push?
true
elsif membership_changed?
true
else
(issue? || merge_request? || note? || milestone?) && target
end
end
def project_name