阅读背景:

Rails:如何使用给定的模型手动验证数据?

来源:互联网 

I am creating a Tumblr alternative to learn how use Rails. I am at the authentication part, and I decided to do it from scratch. I want to allow users to log in using either their username or their email. The user logs in via the Sessions controller but I need to verify if the login is either a valid username or a valid email. So I need to validate data in the Sessions controller using the User model.I am creating a Tumblr alternative to learn how




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: