Add milestone observer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
d89130b097
commit
12d081008d
1 changed files with 13 additions and 0 deletions
13
app/observers/milestone_observer.rb
Normal file
13
app/observers/milestone_observer.rb
Normal 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
|
Loading…
Reference in a new issue