How to have single sign-in form for two devise models

12 views
Skip to first unread message

jeet...@gmail.com

unread,
May 12, 2013, 3:25:17 PM5/12/13
to plataforma...@googlegroups.com
I have two devise models.

devise_for :contractors
devise_for :customers

To make it easier for the users and also cleaner on the frontend. I wish one sign in form in my navbar through both customers and contractors can sign in.

So, i am wondering, how to do that ? Should I have override devise's session controller? If so how. I could have sign in for one devise model through how it is mentioned here - https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app . But over there it  only accepts one resource and resource name. Whereas in this case there are two models.

what is the right away to solve this problem?


Thanks
Reply all
Reply to author
Forward
0 new messages