style(rubocop): Style/MutableConstant

This commit is contained in:
Adam Cooke
2024-02-10 17:34:29 +00:00
parent d508772a40
commit 129dffab9e
14 changed files with 21 additions and 24 deletions
+2 -3
View File
@@ -44,15 +44,14 @@ class Domain < ApplicationRecord
include HasDNSChecks
VERIFICATION_EMAIL_ALIASES = ["webmaster", "postmaster", "admin", "administrator", "hostmaster"]
VERIFICATION_EMAIL_ALIASES = ["webmaster", "postmaster", "admin", "administrator", "hostmaster"].freeze
VERIFICATION_METHODS = ["DNS", "Email"].freeze
belongs_to :server, optional: true
belongs_to :owner, optional: true, polymorphic: true
has_many :routes, dependent: :destroy
has_many :track_domains, dependent: :destroy
VERIFICATION_METHODS = ["DNS", "Email"]
validates :name, presence: true, format: { with: /\A[a-z0-9\-.]*\z/ }, uniqueness: { case_sensitive: false, scope: [:owner_type, :owner_id], message: "is already added" }
validates :verification_method, inclusion: { in: VERIFICATION_METHODS }