From 151fc561acacb98c6a69a2a1bf8da7920a87000f Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Sat, 7 Mar 2015 11:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=9B=B8=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=20Signed-off-by:=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 5 +++-- app/views/mailer/send_invite_in_project.html.erb | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 14c01b93d..b404ea531 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -31,10 +31,11 @@ class Mailer < ActionMailer::Base # 发送邀请未注册用户加入项目邮件 # 功能: 在加入项目的同时自动注册用户 def send_invite_in_project(email, project, invitor) + @email = email @subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} " - password = newpass(6) + @password = newpass(6) @project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id, - :password => password, :login => email) + :password => @password, :login => email) mail :to => email, :subject => @subject end diff --git a/app/views/mailer/send_invite_in_project.html.erb b/app/views/mailer/send_invite_in_project.html.erb index 980adc12d..6dbfcbda6 100644 --- a/app/views/mailer/send_invite_in_project.html.erb +++ b/app/views/mailer/send_invite_in_project.html.erb @@ -6,6 +6,10 @@

<%= @subject %>

<%= link_to @project_url, @project_url%>

+

点击链接后,将自动为您注册账号

+

您的账号为:<%= @email %>

+

密码为: <%= @password %>

+