Autofix Rubocop Lint/AmbiguousOperatorPrecedence (#23681)
This commit is contained in:
parent
e2567df860
commit
a6f77aa28a
7 changed files with 16 additions and 27 deletions
|
@ -14,7 +14,7 @@ class SystemKey < ApplicationRecord
|
|||
|
||||
before_validation :set_key
|
||||
|
||||
scope :expired, ->(now = Time.now.utc) { where(arel_table[:created_at].lt(now - ROTATION_PERIOD * 3)) }
|
||||
scope :expired, ->(now = Time.now.utc) { where(arel_table[:created_at].lt(now - (ROTATION_PERIOD * 3))) }
|
||||
|
||||
class << self
|
||||
def current_key
|
||||
|
|
|
@ -18,5 +18,5 @@ class WebauthnCredential < ApplicationRecord
|
|||
validates :external_id, uniqueness: true
|
||||
validates :nickname, uniqueness: { scope: :user_id }
|
||||
validates :sign_count,
|
||||
numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 2**63 - 1 }
|
||||
numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: (2**63) - 1 }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue