Class: Users::DismissCalloutService

Inherits:
BaseContainerService show all
Defined in:
app/services/users/dismiss_callout_service.rb

Direct Known Subclasses

DismissGroupCalloutService

Instance Attribute Summary

Attributes inherited from BaseContainerService

#container, #current_user, #params

Instance Method Summary collapse

Methods inherited from BaseContainerService

#group_container?, #initialize, #namespace_container?, #project_container?

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 BaseContainerService

Instance Method Details

#executeObject


5
6
7
8
9
# File 'app/services/users/dismiss_callout_service.rb', line 5

def execute
  callout.tap do |record|
    record.update(dismissed_at: Time.current) if record.valid?
  end
end