Add milestone observer

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-03-25 15:07:16 +02:00
parent d89130b097
commit 12d081008d
No known key found for this signature in database
GPG key ID: 627C5F589F467F17

View file

@ -0,0 +1,13 @@
class MilestoneObserver < BaseObserver
def after_create(milestone)
event_service.open_milestone(milestone, current_user)
end
def after_close(milestone, transition)
event_service.close_milestone(milestone, current_user)
end
def after_reopen(milestone, transition)
event_service.reopen_milestone(milestone, current_user)
end
end