Sha256: e738c2e3207f24c621b3f8da009ca91221d7ff0eeb49052721b75e17a67cbd44

Contents?: true

Size: 853 Bytes

Versions: 91

Compression:

Stored size: 853 Bytes

Contents

module Phcscriptcdnpro
  class Script::Url < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

    # 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

91 entries across 91 versions & 1 rubygems

Version Path
phcscriptcdnpro-72.2.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-72.1.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-72.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-71.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-70.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-68.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-67.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-66.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-65.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-64.1.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-64.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-63.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-62.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-61.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-60.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-59.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-58.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-57.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-56.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-55.0.0 app/models/phcscriptcdnpro/script/url.rb