From a7955d39ce52345931fc12aaae278ee17c39f062 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 18 Sep 2018 22:49:24 +0200 Subject: [PATCH] Fix performance regression in Account::Field#verifiable? (#8719) * Fix performance regression in Account::Field#verifiable? Regression from #8703 * Fix code style issue --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index 979e0b12c6..d8e5c73405 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -323,7 +323,7 @@ class Account < ApplicationRecord end def verifiable? - value.present? && /\A#{FetchLinkCardService::URL_PATTERN}\z/ =~ value + value.present? && value.start_with?('http://', 'https://') end def mark_verified!