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-54.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-53.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-52.0.2 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-52.0.1 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-52.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-51.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-50.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-49.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-48.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-47.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-46.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-45.1.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-45.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-44.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-43.2.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-43.1.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-43.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-42.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-41.0.0 app/models/phcscriptcdnpro/script/url.rb
phcscriptcdnpro-40.1.0 app/models/phcscriptcdnpro/script/url.rb