I want to add a subscription type functionality in my application for the account holder users such that with few failed login attempts they will not be able to access their account. Note: I don’t want to delete their account from the database. I’ve already installed devise-2.1.2 in my application. Do any body have any idea how can it be done? I am newbie to Ruby on rails so it will be very helpful to me if you please explain the steps.
I want to add a subscription type functionality in my application for the account
Share
Devise have a buil-in solution with the
:lockableoption check in the Devise Lockable DocumentationYou have to set the
lock_strategyset to:failed_attempts.Step 1
Set your config/initializers/devise.rb to use:
Step 2
Your should add the lockable to you Model as this:
Step 3
Generate the migrations to make devise work
Regards!!