Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

注册激活功能 #14

Closed
windy opened this issue Dec 22, 2012 · 11 comments
Closed

注册激活功能 #14

windy opened this issue Dec 22, 2012 · 11 comments
Labels

Comments

@windy
Copy link
Contributor

windy commented Dec 22, 2012

用户注册后,进入未激活邮箱的状态。 我们同时要发送激活邮件,要防止被识别为垃圾邮件。

没有激活时,19wu 在首页头部给予提示。

这个一个特性节点。大家可以随便讨论和附带代码。

@tooooolong
Copy link

devise 好像自带

@saberma
Copy link
Member

saberma commented Dec 24, 2012

@ShawnYu devise 是有带这个功能,但为了让每个功能尽量细化,就分成多个 issue 去做。

@tooooolong
Copy link

got it

@richard-ma
Copy link
Member

这部分的邮件服务器参数如何配置啊?还是只给最终用户一个模版,让用户自己修改配置?

@saberma
Copy link
Member

saberma commented Dec 30, 2012

@richard-ma 你指的邮件服务器参数是

config.action_mailer.default_url_options = { :host => "example.com" }

还是

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { ... }

@richard-ma
Copy link
Member

在development环境里设置的
config.action_mailer.default_url_options = { :host => "127.0.0.1:3000" }

@richard-ma
Copy link
Member

@saberma 这部分代码有些我理解错了,已经删除了这个分支,我会重写一份。

另外devise的mailer还需要写测试吗?rspec对mailer的测试有没有好的教程可以推荐?

@saberma
Copy link
Member

saberma commented Dec 30, 2012

简单测试只测待发数组中是否有新记录

ActionMailer::Base.deliveries.empty?.should be_false

详细测试类似

 email = FooMailer.send().deliver
 email.subject.should eql "19屋 激活邮件\n"
 email.body.should include('尊敬的马海波')

@windy 有没有补充的

@saberma
Copy link
Member

saberma commented Dec 30, 2012

@richard-ma 看下 @doitian 的这个 PR #122 ,加入了 Setting 配置,也包括 email 的。

@richard-ma
Copy link
Member

@saberma 好的

@saberma
Copy link
Member

saberma commented Jan 2, 2013

@windy 注册功能已经由 @richard-ma 完成,你另起三个待领任务

  • 邮件激活帐号
  • 用户帐号修改页面
  • 用户上传头像

@saberma saberma closed this as completed Jan 2, 2013
johnnyworker1012 pushed a commit to johnnyworker1012/19wu that referenced this issue Jan 4, 2013
johnnyworker1012 pushed a commit to johnnyworker1012/19wu that referenced this issue Jan 4, 2013
johnnyworker1012 pushed a commit to johnnyworker1012/19wu that referenced this issue Jan 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants