gitlab-org--gitlab-foss/app/observers/milestone_observer.rb
Dmitriy Zaporozhets 12d081008d
Add milestone observer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 15:07:16 +02:00

13 lines
353 B
Ruby

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