Class: Boards::UpdateService

Inherits:
BaseService show all
Defined in:
app/services/boards/update_service.rb

Constant Summary collapse

PERMITTED_PARAMS =
%i(name hide_backlog_list hide_closed_list).freeze

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #parent

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from Boards::BaseService

Instance Method Details

#execute(board) ⇒ Object


7
8
9
10
# File 'app/services/boards/update_service.rb', line 7

def execute(board)
  filter_params
  board.update(params)
end

#filter_paramsObject


12
13
14
# File 'app/services/boards/update_service.rb', line 12

def filter_params
  params.slice!(*permitted_params)
end

#permitted_paramsObject


16
17
18
# File 'app/services/boards/update_service.rb', line 16

def permitted_params
  PERMITTED_PARAMS
end