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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.