debian-mirror-gitlab/app/services/boards/create_service.rb

17 lines
338 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
module Boards
class CreateService < Boards::BaseService
def execute
create_board! unless project.board.present?
project.board
end
private
def create_board!
project.create_board
project.board.lists.create(list_type: :backlog)
project.board.lists.create(list_type: :done)
end
end
end