how to do authentication on different type of users using devise
first of all, I avoid using the term "role" here. because there is a similar post answered by ---"looking into cancan".
The problem I need to sovle is that I need to do authentication on two开发者_如何学运维 different type of users, and the attributes of the two users are so different that each of them has their own model and corresdonding table.
If we treat devise's work as access control to the model, my question can be rephrased as does devise support multiple models authentication?I'm quite suspious of that, because look at the file name, under app/views/devise/
, none of
them contails "model" info in it. But anyway, need a confirmative answer from you guys.
All is explain on this todo : https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role
The model in devise library is an include so can be include on several Model of your application.
精彩评论