Class: Issuable::Callbacks::Description
- Defined in:
- app/services/issuable/callbacks/description.rb
Constant Summary collapse
- ALLOWED_PARAMS =
%i[description].freeze
Constants inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#after_create, #after_save, #after_save_commit, #after_update, #after_update_commit, #before_create, execute_without_params?, #initialize
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from Issuable::Callbacks::Base
Instance Method Details
#after_initialize ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/services/issuable/callbacks/description.rb', line 8 def after_initialize params[:description] = nil if excluded_in_new_type? return unless update_description? issuable.description = params[:description] end |
#before_update ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/services/issuable/callbacks/description.rb', line 16 def before_update return unless issuable.description_changed? = Gitlab::Auth::Identity.invert_composite_identity(current_user) issuable.assign_attributes(last_edited_at: Time.current, last_edited_by: ) end |