Sha256: c1ca2e113b087b8ea92a81658b8883f793af341959b0192e329319d47fdcef74

Contents?: true

Size: 563 Bytes

Versions: 12

Compression:

Stored size: 563 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_post_url,
      presence: true,
      format: {  :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" }

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
phcdevworks_scripts-8.1.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.1.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.5 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.4 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.3 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.2 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-8.0.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-7.4.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-7.2.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-7.1.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-7.0.0 app/models/phcdevworks_scripts/snippet/url.rb