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

Feature/13 user sign up #67

Merged
merged 17 commits into from Dec 27, 2012
Merged

Conversation

richard-ma
Copy link
Member

feature #13

  1. devise实现
  2. 实现首页表单用户注册,可以在rails console中察看注册结果
  3. 添加了一个确认密码input标签

TODO

  1. 显示注册成功信息
  2. 确认注册成功后的页面跳转
  3. 昵称写入数据库,目前没有保存昵称
  4. 清理代码

button.btn type="submit" = t('label.sign_up')
input#user_email name="user[email]" size="30" type="email" placeholder=t('label.email_address')
input#user_password name="user[password]" size="30" type="password" placeholder=t('label.password')
input#user_password_confirmation name="user[password_confirmation]" size="30" type="password" placeholder=t('label.password_confirmation')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认密码可以不用了,如果用户输出,登录时还可以通过「忘记密码」找回来。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,这里修改一下

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我又考虑了一下,是否叫username更合适一些,login有时有动词的意思。或者loginname

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就叫 username

@saberma
Copy link
Member

saberma commented Dec 27, 2012

  1. 显示注册成功信息
  2. 确认注册成功后的页面跳转
    成功后还是跳转到 localhost:3000 保持 url 不变,但先提示「登录成功」字样
  3. 昵称写入数据库,目前没有保存昵称
    昵称改为「登录名」 login
  4. 清理代码
    lock 类都可以清理掉,其他的「修改密码」、「修改个人信息」放到后面再做。
  5. 这里得加上集成测试代码
  6. 邮件确认功能放在 注册激活功能 #14 ,但数据库中先在这里定义好。
  7. 「忘记密码」放在 用户「忘记密码」功能 #70 做。

input type="password" placeholder=t('label.password')

button.btn type="submit" = t('label.sign_up')
form.login action="/users" accept-charset="UTF-8" id="new_user" method="post"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/users 改成 helper

@hardywu
Copy link
Contributor

hardywu commented Dec 27, 2012

如何在註冊功能沒完成的情況下寫登陸功能?

@saberma
Copy link
Member

saberma commented Dec 27, 2012

@hardywu 还要稍等一下才能开发登陆功能,这个注册功能 @richard-ma 就差一点就可以合并进来了。

@richard-ma
Copy link
Member Author

@nightire 是手工做的

@richard-ma
Copy link
Member Author

@saberma 修改的差不多了,但确认密码如何从表单中拿掉,同时又不影响注册呢?是否需要修改devise框架代码?目前没思路。

@saberma
Copy link
Member

saberma commented Dec 27, 2012

@richard-ma 注册的先到这里。至于把确认密码去掉的可以作为新的 issue,你提一个吧。

saberma added a commit that referenced this pull request Dec 27, 2012
@saberma saberma merged commit c68ee76 into 19wu:master Dec 27, 2012
@saberma saberma mentioned this pull request Dec 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants