Sha256: 955c065c51af2f453171f56ebf40e44523faee8ce5e23af601115f3ed7d1b27c

Contents?: true

Size: 592 Bytes

Versions: 10

Compression:

Stored size: 592 Bytes

Contents

module Phcscriptcdn
  class Script::Licence < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    has_paper_trail :class_name => 'Phcscriptcdn::LicenceVersions'

    # Relationships
    has_many :listings, class_name: 'Phcscriptcdn::Script::Listing'

    # Form Fields Validation
    validates :licence_name,
      presence: true

    validates :licence_description,
      presence: true

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

    def phc_nice_url_slug
      [:licence_name]
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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