mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Fix Rubocop issues after Ruby upgrade
This commit is contained in:
parent
3c1125879c
commit
15a651e51b
18 changed files with 25 additions and 26 deletions
|
@ -168,7 +168,7 @@ class EppController < ApplicationController
|
|||
|
||||
# validate legal document's type here because it may be in most of the requests
|
||||
@prefix = nil
|
||||
if element_count('extdata > legalDocument') > 0
|
||||
if element_count('extdata > legalDocument').positive?
|
||||
requires_attribute('extdata > legalDocument', 'type', values: LegalDocument::TYPES, policy: true)
|
||||
end
|
||||
|
||||
|
@ -279,7 +279,7 @@ class EppController < ApplicationController
|
|||
def optional(selector, *validations)
|
||||
full_selector = [@prefix, selector].compact.join(' ')
|
||||
el = params[:parsed_frame].css(full_selector).first
|
||||
return unless el && el.text.present?
|
||||
return unless el&.text.present?
|
||||
value = el.text
|
||||
|
||||
validations.each do |x|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue