Skip to content

Commit 4bc0dbe

Browse files
committed
Fix linter issues
1 parent 06039ad commit 4bc0dbe

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

app/models/admin.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class Admin < ApplicationRecord
24
# Include default devise modules. Others available are:
35
# :confirmable, :lockable, :registerable, :timeoutable, and :omniauthable

config/initializers/devise.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Configure the e-mail address which will be shown in Devise::Mailer,
2525
# note that it will be overwritten if you use your own mailer class
2626
# with default "from" parameter.
27-
config.mailer_sender = '[email protected]'
27+
config.mailer_sender = "[email protected]"
2828

2929
# Configure the class responsible to send e-mails.
3030
# config.mailer = 'Devise::Mailer'
@@ -36,7 +36,7 @@
3636
# Load and configure the ORM. Supports :active_record (default) and
3737
# :mongoid (bson_ext recommended) by default. Other ORMs may be
3838
# available as additional gems.
39-
require 'devise/orm/active_record'
39+
require "devise/orm/active_record"
4040

4141
# ==> Configuration for any authentication mechanism
4242
# Configure which keys are used when authenticating a user. The default is

db/migrate/20240814221626_devise_create_admins.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def change
3333
# t.datetime :locked_at
3434

3535
t.timestamps null: false
36-
end
3736

38-
add_index :admins, :email, unique: true
39-
add_index :admins, :reset_password_token, unique: true
40-
# add_index :admins, :confirmation_token, unique: true
41-
# add_index :admins, :unlock_token, unique: true
37+
t.index :email, unique: true
38+
t.index :reset_password_token, unique: true
39+
# t.index :confirmation_token, unique: true
40+
# t.index :unlock_token, unique: true
41+
end
4242
end
4343
end

db/schema.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
t.string "reset_password_token"
4646
t.datetime "reset_password_sent_at"
4747
t.datetime "remember_created_at"
48+
t.integer "sign_in_count", default: 0, null: false
49+
t.datetime "current_sign_in_at"
50+
t.datetime "last_sign_in_at"
51+
t.string "current_sign_in_ip"
52+
t.string "last_sign_in_ip"
4853
t.datetime "created_at", null: false
4954
t.datetime "updated_at", null: false
5055
t.index ["email"], name: "index_admins_on_email", unique: true

test/models/admin_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "test_helper"
24

35
class AdminTest < ActiveSupport::TestCase

0 commit comments

Comments
 (0)