Ankur Kumar
2014-May-03 03:13 UTC
Devise + Switch User : How to avoid update in trackable devise columns for a switch user?
I am using switch_user <https://github.com/flyerhzm/switch_user> rails gem to login as any other devise user from an admin account. When I use switch_user for an account, the devise session updates all the devise trackable attributes for that user such as: t.integer "sign_in_count", t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" which I don't want to happen. These updates should happen only when an end user actually logs in and not for an admin account through switch_user. How can I achieve this? Thanks. -- Regards, Ankur -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALSL1eNjAuiSYrr79TXEbONzu6zUnGVsHHhZUUrp_mEYYUUpHw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.