ruby on rails - Rails4, How to config multiple model on sorcery Gem -
i change user model normal_user , admin_user
and wanna authenticate both user on web
my plan normal_user using web page , admin_user using admin or client page
below sorcery config file support 1 model.
config.user_class = "user"
but wanna suport user , adminuser.
how config file or solution setting multiple authencatin user?
you can try in application controller (module: admin )
rails.application.config.sorcery.user_class = admin
or without module inside default application controller
rails.application.config.sorcery.user_class = user
perhaps you.
Comments
Post a Comment