milestone_observer.rb 353 Bytes
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1 2 3 4 5 6 7 8 9 10 11 12 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