Sha256: 93802f1ca1a8c87f4ff5369e18b54673a5c533faad9e685b1bc96d7141aaad7d

Contents?: true

Size: 558 Bytes

Versions: 15

Compression:

Stored size: 558 Bytes

Contents

module PhcdevworksScripts
  class Snippet::Url < ApplicationRecord

    # Include Core Validations
    phc_domain_regx = URI::regexp(%w(http https))

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksScripts::SnippetUrlVersions'

    # Relationships
    belongs_to :post, class_name: 'PhcdevworksScripts::Snippet::Post'

    # Form Fields Validation
    validates :snippet_url,
      presence: true,
      format: {  :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" }

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
phcdevworks_scripts-5.8.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.7.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.7.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.6.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.5.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.4.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.3.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.2.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.1.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-5.0.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-4.1.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-4.1.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-4.0.2 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-4.0.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-4.0.0 app/models/phcdevworks_scripts/snippet/url.rb