mailer邮件邀请页面参数修改
This commit is contained in:
parent
4088d134df
commit
0d3e129c39
|
@ -72,13 +72,14 @@ class Mailer < ActionMailer::Base
|
|||
# 邀请已注册的用户加入项目
|
||||
def request_member_to_project(email, project, invitor)
|
||||
user = User.find_by_mail(email.to_s)
|
||||
Member.create(:role_ids => [4], :user_id => user.id,:project_id => project.id)
|
||||
@invitor_name = "#{invitor.name}"
|
||||
@project_name = "#{project.name}"
|
||||
@user = user
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id,:user => user, :token => @token.value)
|
||||
mail :to => email, :invitor_name => "#{@invitor_name}", :project_name => "#{@project_name}"
|
||||
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
|
||||
Member.create(:role_ids => [4], :user_id => user.id,:project_id => project.id)
|
||||
@invitor_name = "#{invitor.name}"
|
||||
@project_name = "#{project.name}"
|
||||
@user = user
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id,:user => user, :token => @token.value)
|
||||
mail :to => email,:subject => @subject, :invitor_name => "#{@invitor_name}", :project_name => "#{@project_name}"
|
||||
end
|
||||
|
||||
# author: alan
|
||||
|
|
Loading…
Reference in New Issue