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.
精彩评论