• Thong Kuah's avatar
    Align UrlValidator to validate_url gem implementation. · d119d3d1
    Thong Kuah authored
    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.
    d119d3d1
addressable_url_validator_spec.rb 7.6 KB