gitlab-org--gitlab-foss/app/services/boards/list_service.rb
2017-08-28 18:56:49 -03:00

14 lines
260 B
Ruby

module Boards
class ListService < Boards::BaseService
def execute
create_board! if parent.boards.empty?
parent.boards
end
private
def create_board!
Boards::CreateService.new(parent, current_user).execute
end
end
end