gitlab-org--gitlab-foss/app/services/milestones/create_service.rb
Dmitriy Zaporozhets c4b02642d2
Replace milestone observer with services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-10 18:07:52 +03:00

13 lines
263 B
Ruby

module Milestones
class CreateService < Milestones::BaseService
def execute
milestone = project.milestones.new(params)
if milestone.save
event_service.open_milestone(milestone, current_user)
end
milestone
end
end
end