Fix Rubocop issues after Ruby upgrade

This commit is contained in:
Maciej Szlosarczyk 2018-04-27 15:01:39 +03:00
parent 3c1125879c
commit 15a651e51b
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
18 changed files with 25 additions and 26 deletions

View file

@ -147,7 +147,7 @@ class Epp::Contact < Contact
end
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
self.legal_document_id = doc.id
end
@ -238,7 +238,7 @@ class Epp::Contact < Contact
)
self.legal_documents = [doc]
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
self.legal_document_id = doc.id
end

View file

@ -197,7 +197,7 @@ class Epp::Domain < Domain
)
self.legal_documents = [doc]
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
self.legal_document_id = doc.id
end
# rubocop: enable Metrics/PerceivedComplexity
@ -472,7 +472,7 @@ class Epp::Domain < Domain
at.deep_merge!(attrs_from(frame.css('rem'), current_user, 'rem'))
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
self.legal_document_id = doc.id
end
@ -547,7 +547,7 @@ class Epp::Domain < Domain
check_discarded
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
end
if Setting.request_confirmation_on_domain_deletion_enabled &&