From d119d3d1b25aac661e6251addf87b280bd37f0c5 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Thu, 11 Apr 2019 06:29:07 +0000 Subject: Align UrlValidator to validate_url gem implementation. Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement. Make use of the options attribute of the parent class ActiveModel::EachValidator. Add more options: allow_nil, allow_blank, message. Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator. --- app/models/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/environment.rb') diff --git a/app/models/environment.rb b/app/models/environment.rb index fa29a83e517..69224635e34 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -35,7 +35,7 @@ class Environment < ApplicationRecord validates :external_url, length: { maximum: 255 }, allow_nil: true, - url: true + addressable_url: true delegate :stop_action, :manual_actions, to: :last_deployment, allow_nil: true -- cgit v1.2.1