Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
reesericci committed Jan 18, 2024
1 parent f3670b0 commit 564185a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/domain.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Domain < ApplicationRecord
include DnsimpleHelper
validates :host, uniqueness: true
validates :host, uniqueness: true # standard:disable all
validates :user_users_id, presence: {message: "User ID is not present"}

after_create ->(d) { Domain::InitializeJob.perform_later(d.id) }, unless: proc { |d| d.provisional }
Expand Down
6 changes: 3 additions & 3 deletions app/models/user/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class User::User < ApplicationRecord
validates :email, uniqueness: true
has_many :user_credentials
validates :email, uniqueness: true # standard:disable all
has_many :user_credentials # standard:disable all

after_initialize do
@hotp = ROTP::HOTP.new(hotp_token)
Expand All @@ -10,7 +10,7 @@ def mint_otp
self.otp_counter += 1
otp = @hotp.at(self.otp_counter)
self.otp_last_minted = Time.now.to_i
save
save!

otp
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateNewUserModelAndDeleteOldUserModel < ActiveRecord::Migration[7.0]
def change
remove_reference :domains, :users, foreign_key: true
drop_table :users
drop_table :users # standard:disable all

create_table :user_users do |t|
t.string :email
Expand Down

0 comments on commit 564185a

Please sign in to comment.