Sha256: 9986fcc77d8700e50943fe65ccca27689ebe4a8fb0fdf43dbdd402e82adcd760

Contents?: true

Size: 832 Bytes

Versions: 54

Compression:

Stored size: 832 Bytes

Contents

module Phcscriptcdn
  class Script::Url < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

    # Relationships
    belongs_to :listing, class_name: 'Phcscriptcdn::Script::Listing'
    belongs_to :version, class_name: 'Phcscriptcdn::Script::Version'
    belongs_to :extension, class_name: 'Phcscriptcdn::Script::Extension'

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

    validates :scripturlrelease,
      presence: true

    validates :scripturlcdnupdate,
      presence: true

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

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

  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
phcscriptcdn-29.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-28.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-27.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-26.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-25.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-24.0.1 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-24.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-23.1.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-23.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-22.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-21.2.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-21.1.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-21.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-20.0.1 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-20.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-19.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-18.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-17.0.1 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-17.0.0 app/models/phcscriptcdn/script/url.rb
phcscriptcdn-16.0.0 app/models/phcscriptcdn/script/url.rb