Sha256: 2abc97eb2668cb0949814933d83dae75208b693a7190ea046d8a46cf72c2d641

Contents?: true

Size: 601 Bytes

Versions: 12

Compression:

Stored size: 601 Bytes

Contents

module Phcscriptcdnpro
  class Script::Licence < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

    # Relationships
    has_many :listings, class_name: 'Phcscriptcdnpro::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

12 entries across 12 versions & 1 rubygems

Version Path
phcscriptcdnpro-79.0.3 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-79.0.2 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-79.0.1 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-79.0.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-78.4.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-78.3.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-78.2.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-78.1.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-78.0.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-77.0.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-75.0.0 app/models/phcscriptcdnpro/script/licence.rb
phcscriptcdnpro-74.0.0 app/models/phcscriptcdnpro/script/licence.rb