Class: ApplicationMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/application_mailer.rb

Constant Summary collapse

SMTPConnectionError =

Ignore transient SMTP connection errors in our SLIs. These are transient and are fixed by a retry.

Class.new(Gitlab::SidekiqMiddleware::RetryError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_userObject

Returns the value of attribute current_user.



17
18
19
# File 'app/mailers/application_mailer.rb', line 17

def current_user
  @current_user
end

Instance Method Details

#can?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/mailers/application_mailer.rb', line 24

def can?
  Ability.allowed?(current_user, action, subject)
end