Sha256: 5c31d32a215f8906950b71e33554494122dd010d8f4e84871a77d158aa0f2c27
Contents?: true
Size: 454 Bytes
Versions: 1
Compression:
Stored size: 454 Bytes
Contents
# (c) Copyright 2017 Ribose Inc. # require "active_model" module UriFormatValidator module Validators module HelperMethods # Encapsulates the pattern of wanting to validate an URL. # # class Post < ActiveRecord::Base # validates_uri_format_of :permalink # end def validates_uri_format_of(*attr_names) validates_with UriFormatValidator, _merge_attributes(attr_names) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
uri_format_validator-0.1.0 | lib/uri_format_validator/validators/helper_methods.rb |