Multiple loggable classes
rscardinho opened this issue · comments
I have two loggable classes in my app: User
and Customer
and I'm willing to log into a Customer
from a User
(which is my admin role). Is there any setup that allows me to do this?
I did check the impersonates
method implementation and the #true_scope
method isn't as flexible as #current_scope
, which may block the impersonate that I described above
If there is no way to do what I'm trying to, what do you guys think about making the #true_scope
configurable?
Hey @rscardinho, if your models are separate, can you just sign in as the customer? (without Pretender at all)
Hi @ankane, that's what I did after all. I'm using Devise's sign_in
and sign_out
methods and the impersonate implementation is very similar to pretender
Great.