So I have made a project in ruby on rails for authentication using devise and facebook. While logging in through devise simple sign up I am getting this error of:
undefined local variable or method `locked_at' for # Did you mean? lock_access!
I think locked_at column were not added for users table
generate migration for adding column in users table
def change
add_column :users, :locked_at, :datetime
end
For those who are coming here from Google like me, you may want to also heed this line in the Devise getting started README - https://github.com/plataformatec/devise#getting-started
Next, check the MODEL for any additional configuration options you might want to add, such as confirmable or lockable. If you add an option, be sure to inspect the migration file (created by the generator if your ORM supports them) and uncomment the appropriate section. For example, if you add the confirmable option in the model, you'll need to uncomment the Confirmable section in the migration.
Double check your Devise users migration file (db/migrate/TIMESTAMP_devise_create_users.rb
) and uncomment any of the necessary sections. In this case, the sections relating to the Lockable
module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With