Sha256: 2eee99d5eef5953350517b76e1f19a10077d17684b6040fa6ca2f78c5f1b610c

Contents?: true

Size: 835 Bytes

Versions: 55

Compression:

Stored size: 835 Bytes

Contents

module Phcscriptcdn
  class Script::Extension < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Add Paper Trail
    has_paper_trail :class_name => 'Phcscriptcdn::ExtensionVersions'

    # Relationships
    has_many :listings, class_name: 'Phcscriptcdn::Script::Listing', :through => :urls
    has_many :urls, class_name: 'Phcscriptcdn::Script::Url'

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

    validates :scriptextensiondes,
      presence: true

    validates :scriptextension,
      presence: true

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

    # Define for Multiple Records
    def phcscriptcdn_extentension_slug
      [
        [:scriptextensionname, :scriptextension]
      ]
    end

  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
phcscriptcdn-49.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-48.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-47.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-44.1.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-45.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-44.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-43.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-42.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-41.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-40.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-38.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-37.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-36.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-35.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-34.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-33.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-32.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-31.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-30.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-29.2.0 app/models/phcscriptcdn/script/extension.rb