Class: Issuable::DestroyService
- Inherits:
-
IssuableBaseService
- Object
- BaseContainerService
- IssuableBaseService
- Issuable::DestroyService
- Defined in:
- app/services/issuable/destroy_service.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseContainerService
#container, #current_user, #group, #params, #project
Instance Method Summary collapse
- #execute(issuable) ⇒ Object
-
#initialize(container:, current_user: nil, params: {}) ⇒ DestroyService
constructor
TODO: this is to be removed once we get to rename the IssuableBaseService project param to container.
Methods inherited from BaseContainerService
#group_container?, #namespace_container?, #project_container?, #project_group
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
Constructor Details
#initialize(container:, current_user: nil, params: {}) ⇒ DestroyService
TODO: this is to be removed once we get to rename the IssuableBaseService project param to container
6 7 8 |
# File 'app/services/issuable/destroy_service.rb', line 6 def initialize(container:, current_user: nil, params: {}) super(container: container, current_user: current_user, params: params) end |
Instance Method Details
#execute(issuable) ⇒ Object
10 11 12 13 |
# File 'app/services/issuable/destroy_service.rb', line 10 def execute(issuable) before_destroy(issuable) after_destroy(issuable) if issuable.destroy end |