Class: WorkItems::Widgets::DescriptionService::UpdateService
- Inherits:
-
BaseService
- Object
- BaseService
- BaseService
- WorkItems::Widgets::DescriptionService::UpdateService
- Defined in:
- app/services/work_items/widgets/description_service/update_service.rb
Constant Summary
Constants inherited from BaseService
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #service_params, #widget, #work_item
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
Methods inherited from BaseService
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
This class inherits a constructor from WorkItems::Widgets::BaseService
Instance Method Details
#before_update_callback(params: {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/services/work_items/widgets/description_service/update_service.rb', line 7 def before_update_callback(params: {}) params[:description] = nil if return unless params.present? && params.key?(:description) return unless (:update_work_item) work_item.description = params[:description] work_item.assign_attributes(last_edited_at: Time.current, last_edited_by: current_user) end |