Sha256: 8ef4b1766c8d725ed581bfc262174a971c5c2bc708de23d233f429d07077d152

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

module Phcscriptcdn
  class Script::Licence < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

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

    validates :licence_description,
      presence: true

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

    # Define for Multiple Records
    def phcscriptcdn_licence_slug
      [
        [:licence_name]
      ]
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phcscriptcdn-51.0.0 app/models/phcscriptcdn/script/licence.rb
phcscriptcdn-50.0.0 app/models/phcscriptcdn/script/licence.rb