Use match? instead of match for regex where MatchData is unused

This commit is contained in:
Maciej Szlosarczyk 2018-08-17 10:36:52 +03:00
parent db08ad7125
commit 82dbd3e8b8
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
7 changed files with 12 additions and 10 deletions

View file

@ -145,7 +145,7 @@ class EppController < ApplicationController
# VALIDATION
def latin_only
return true if params['frame'].blank?
return true if params['frame'].match(/\A[\p{Latin}\p{Z}\p{P}\p{S}\p{Cc}\p{Cf}\w_\'\+\-\.\(\)\/]*\Z/i)
return true if params['frame'].match?(/\A[\p{Latin}\p{Z}\p{P}\p{S}\p{Cc}\p{Cf}\w_\'\+\-\.\(\)\/]*\Z/i)
epp_errors << {
msg: 'Parameter value policy error. Allowed only Latin characters.',