Update new_user_email to take id for User and perform find itself.
This commit is contained in:
parent
06b45acb8f
commit
345f176a74
3 changed files with 6 additions and 6 deletions
|
@ -7,10 +7,10 @@ class Notify < ActionMailer::Base
|
|||
|
||||
default from: EMAIL_OPTS["from"]
|
||||
|
||||
def new_user_email(user, password)
|
||||
@user = user
|
||||
def new_user_email(user_id, password)
|
||||
@user = User.find(user_id)
|
||||
@password = password
|
||||
mail(:to => @user['email'], :subject => "gitlab | Account was created for you")
|
||||
mail(:to => @user.email, :subject => "gitlab | Account was created for you")
|
||||
end
|
||||
|
||||
def new_issue_email(issue)
|
||||
|
|
|
@ -23,7 +23,7 @@ class MailerObserver < ActiveRecord::Observer
|
|||
end
|
||||
|
||||
def new_user(user)
|
||||
Notify.new_user_email(user, user.password).deliver
|
||||
Notify.new_user_email(user.id, user.password).deliver
|
||||
end
|
||||
|
||||
def new_note(note)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue