Sha256: f377eb1ac2a5a2cbb81244c62811a6735667a68756dfdaaf9a9a67f6ace84d03

Contents?: true

Size: 771 Bytes

Versions: 5

Compression:

Stored size: 771 Bytes

Contents

module Phcscriptcdnpro
  class Script::Version < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Add Paper Trail
    has_paper_trail :class_name => 'Phcscriptcdnpro::UrlVersions'

    # Relationships
    has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
    has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'

    # Validation for Form Fields
    validates :scripturl,
      presence: true

    validates :scripturlrelease,
      presence: true

    validates :scripturlcdnupdate,
      presence: true

    # Clean URL Define
    friendly_id :phcscriptcdnpro_url_slug, use: [:slugged, :finders]

    # Define for Multiple Records
    def phcscriptcdnpro_url_slug
      [
        [:scripturl]
      ]
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phcscriptcdnpro-16.1.0 app/models/phcscriptcdnpro/script/version.rb
phcscriptcdnpro-16.0.0 app/models/phcscriptcdnpro/script/version.rb
phcscriptcdnpro-15.2.0 app/models/phcscriptcdnpro/script/version.rb
phcscriptcdnpro-15.1.0 app/models/phcscriptcdnpro/script/version.rb
phcscriptcdnpro-15.0.0 app/models/phcscriptcdnpro/script/version.rb