Add Remember Me to login
This requires a migration, our first migration against the openneo_id database from this app! Fun!
This commit is contained in:
parent
b2a027fbbf
commit
e79428fa28
4 changed files with 13 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
class AuthUser < AuthRecord
|
class AuthUser < AuthRecord
|
||||||
self.table_name = 'users'
|
self.table_name = 'users'
|
||||||
|
|
||||||
devise :database_authenticatable, :encryptable, :registerable, :validatable
|
devise :database_authenticatable, :encryptable, :registerable, :validatable,
|
||||||
|
:rememberable
|
||||||
# devise :database_authenticatable, :lockable, :registerable, :recoverable,
|
# devise :database_authenticatable, :lockable, :registerable, :recoverable,
|
||||||
# :trackable, :validatable
|
# :trackable, :validatable
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ development:
|
||||||
pool: 2
|
pool: 2
|
||||||
variables:
|
variables:
|
||||||
sql_mode: TRADITIONAL
|
sql_mode: TRADITIONAL
|
||||||
|
migrations_paths: db/openneo_id_migrate
|
||||||
|
|
||||||
production:
|
production:
|
||||||
primary:
|
primary:
|
||||||
|
@ -27,3 +28,4 @@ production:
|
||||||
url: <%= ENV['DATABASE_URL_OPENNEO_ID'] %>
|
url: <%= ENV['DATABASE_URL_OPENNEO_ID'] %>
|
||||||
variables:
|
variables:
|
||||||
sql_mode: TRADITIONAL
|
sql_mode: TRADITIONAL
|
||||||
|
migrations_paths: db/openneo_id_migrate
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
class AddRememberCreatedAtToUsers < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
change_table :users do |t|
|
||||||
|
t.datetime :remember_created_at
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.0].define(version: 0) do
|
ActiveRecord::Schema[7.0].define(version: 2023_08_07_005748) do
|
||||||
create_table "users", id: { type: :integer, unsigned: true }, charset: "utf8", force: :cascade do |t|
|
create_table "users", id: { type: :integer, unsigned: true }, charset: "utf8", force: :cascade do |t|
|
||||||
t.string "name", limit: 20, null: false
|
t.string "name", limit: 20, null: false
|
||||||
t.string "encrypted_password", limit: 64, null: false
|
t.string "encrypted_password", limit: 64, null: false
|
||||||
|
@ -28,6 +28,7 @@ ActiveRecord::Schema[7.0].define(version: 0) do
|
||||||
t.datetime "created_at", precision: nil
|
t.datetime "created_at", precision: nil
|
||||||
t.datetime "updated_at", precision: nil
|
t.datetime "updated_at", precision: nil
|
||||||
t.datetime "reset_password_sent_at", precision: nil
|
t.datetime "reset_password_sent_at", precision: nil
|
||||||
|
t.datetime "remember_created_at"
|
||||||
t.index ["email"], name: "index_users_on_email", unique: true
|
t.index ["email"], name: "index_users_on_email", unique: true
|
||||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||||
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
||||||
|
|
Loading…
Reference in a new issue