Move new_note email logic to NotificationService
This commit is contained in:
parent
f93c4dc0d8
commit
6abf58466f
3 changed files with 34 additions and 34 deletions
|
@ -2,8 +2,7 @@ class UserObserver < ActiveRecord::Observer
|
|||
def after_create(user)
|
||||
log_info("User \"#{user.name}\" (#{user.email}) was created")
|
||||
|
||||
# Dont email omniauth created users
|
||||
Notify.delay.new_user_email(user.id, user.password) unless user.extern_uid?
|
||||
notification.new_user(user)
|
||||
end
|
||||
|
||||
def after_destroy user
|
||||
|
@ -25,4 +24,8 @@ class UserObserver < ActiveRecord::Observer
|
|||
def log_info message
|
||||
Gitlab::AppLogger.info message
|
||||
end
|
||||
|
||||
def notification
|
||||
NotificationService.new
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue