Apply Layout/LineLength rubocop rule
Note we're excluding a few files: * Configuration files that weren't generated by us * Migration files that weren't generated by us * The Gemfile, since it includes an important comment that must be on the same line as the gem declaration * The Budget::Stats class, since the heading statistics are a mess and having shorter lines would require a lot of refactoring
This commit is contained in:
@@ -53,10 +53,12 @@ class Verification::Management::Email
|
||||
return if errors.count > 0
|
||||
|
||||
if document_number_mismatch?
|
||||
errors.add(:email,
|
||||
I18n.t("management.email_verifications.document_mismatch",
|
||||
document_type: ApplicationController.helpers.humanize_document_type(user.document_type),
|
||||
document_number: user.document_number))
|
||||
errors.add(
|
||||
:email,
|
||||
I18n.t("management.email_verifications.document_mismatch",
|
||||
document_type: ApplicationController.helpers.humanize_document_type(user.document_type),
|
||||
document_number: user.document_number)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ class Verification::Residence
|
||||
end
|
||||
|
||||
def document_number_uniqueness
|
||||
errors.add(:document_number, I18n.t("errors.messages.taken")) if User.active.where(document_number: document_number).any?
|
||||
if User.active.where(document_number: document_number).any?
|
||||
errors.add(:document_number, I18n.t("errors.messages.taken"))
|
||||
end
|
||||
end
|
||||
|
||||
def store_failed_attempt
|
||||
@@ -74,7 +76,8 @@ class Verification::Residence
|
||||
end
|
||||
|
||||
def local_postal_code
|
||||
errors.add(:postal_code, I18n.t("verification.residence.new.error_not_allowed_postal_code")) unless valid_postal_code?
|
||||
errors.add(:postal_code,
|
||||
I18n.t("verification.residence.new.error_not_allowed_postal_code")) unless valid_postal_code?
|
||||
end
|
||||
|
||||
def local_residence
|
||||
|
||||
Reference in New Issue
Block a user