I am using devise successfully, but decided to add the :lockable module. Our table is called Users.
I cannot find docs on how to add a new devise module (or remove one) after doing an initial setup.
I am using devise successfully, but decided to add the :lockable module. Our table is called Users.
I cannot find docs on how to add a new devise module (or remove one) after doing an initial setup.
You should be able to do the following in a migration
change_table(:users) do |t|
t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
end
The fields it adds are:
t.integer "failed_attempts", :default => 0
t.string "unlock_token"
t.datetime "locked_at"
Devise adds a call to devise
in your model app/models/user.rb
in your case. You can just add :lockable
as a parameter to that.