Ask A Question
You’re not receiving notifications from this thread.
How do I remove Devise::Trackable from my app?
Daniel Weaver asked in Gems / Libraries • Solved
I'd like to remove the Trackable module of Devise.
Is it as simple as removing
:trackable from the
devise line in
User.rb and then creating a migration to remove the columns created for the module?
# User.rb ... devise :database_authenticatable, :registerable, :rememberable, :validatable, :trackable # becomes devise :database_authenticatable, :registerable, :rememberable, :validatable ...
and migration like:
def change remove_column :users, :sign_in_count remove_column :users, :current_sign_in_at remove_column :users, :last_sign_in_at remove_column :users, :current_sign_in_ip remove_column :users, :last_sign_in_ip end
I could just disable it but if I'm not going ot be using it at all I'd prefer to remove it entirely.
Yep, that should be it. You don't have to remove the columns, but you might as well if you don't need the data.