refactor suggested by @knu

Andrew Cantino лет %!s(int64=10): %!d(string=назад)
Родитель
Сommit
035097bf76
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/concerns/web_request_concern.rb

+ 1 - 1
app/concerns/web_request_concern.rb

@@ -9,7 +9,7 @@ module WebRequestConcern
9 9
       errors.add(:base, "user_agent must be a string") unless options['user_agent'].is_a?(String)
10 10
     end
11 11
 
12
-    if options['disable_ssl_verification'].present? && ![true, false, 'true', 'false'].include?(options['disable_ssl_verification'])
12
+    if options['disable_ssl_verification'].present? && boolify(options['disable_ssl_verification']).nil?
13 13
       errors.add(:base, "if provided, disable_ssl_verification must be true or false")
14 14
     end
15 15