Sha256: c6f936e8fe0ce503ae4a2a883b6e2f0bde8308ec70e1de9f9235ca6b13b5c275

Contents?: true

Size: 677 Bytes

Versions: 1

Compression:

Stored size: 677 Bytes

Contents

module Phcscriptcdnpro
  class Script::Version < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

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

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

    # Define for Multiple Records
    def phcscriptcdn_version_slug
      [
        [:scriptversion]
      ]
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phcscriptcdnpro-17.1.0 app/models/phcscriptcdnpro/script/version.rb