开发者

User authentication in RoR - should it be in the User handler or its own Authentication handler?

I'm writing user authentication (sign in/sign out) right now in RoR and am wondering if its better to put it in the User handle开发者_如何学编程r, or make its own handler.

Anyone who has used RoR, what's your take on this?


I would make it so that any model can utilize the authentication, thus create it like a gem.

However, i would highly recommend that you use a ready made solution, like Devise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜