Sha256: edc6799943bd76a098c1619d8dcb7f855c607520b300887e647ca00c1b213c2f

Contents?: true

Size: 752 Bytes

Versions: 10

Compression:

Stored size: 752 Bytes

Contents

module Phcscriptcdn
  class Script::Extension < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    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'

    # Form Fields Validation
    validates :script_extension_name,
      presence: true

    validates :script_extension_description,
      presence: true

    validates :script_extension,
      presence: true

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

    def phc_nice_url_slug
      [:script_extension]
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
phcscriptcdn-55.0.3 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-55.0.2 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-55.0.1 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-55.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-54.3.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-54.2.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-54.1.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-54.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-53.0.0 app/models/phcscriptcdn/script/extension.rb
phcscriptcdn-52.0.0 app/models/phcscriptcdn/script/extension.rb