Sha256: b9118ba6cd2f9a1f40758abf8d3e647f944135e73e44cc21b2a6d61c951b3111

Contents?: true

Size: 671 Bytes

Versions: 54

Compression:

Stored size: 671 Bytes

Contents

module Phcscriptcdn
  class Script::Author < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

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

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

    validates :authorlastname,
      presence: true

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

    # Define for Multiple Records
    def phcscriptcdn_author_slug
      [
        [:authorfirstname, :authorlastname]
      ]
    end

  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
phcscriptcdn-15.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-14.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-13.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-12.1.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-12.0.1 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-12.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-11.1.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-11.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-10.1.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-10.0.1 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-10.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-9.0.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-8.2.0 app/models/phcscriptcdn/script/author.rb
phcscriptcdn-8.1.0 app/models/phcscriptcdn/script/author.rb