app/models/phcscriptcdn/script/author.rb in phcscriptcdn-7.2.2 vs app/models/phcscriptcdn/script/author.rb in phcscriptcdn-8.1.0

- old
+ new

@@ -1,21 +1,31 @@ module Phcscriptcdn class Script::Author < ApplicationRecord - # Clean URLS + # Clean URL Initialize extend FriendlyId - # Listing (None Nested) + # 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 URLS Slugs - friendly_id :authorfirstname, use: :slugged + # Clean URL Define + friendly_id :phcscriptcdn_author_slug, use: [:slugged, :finders] + # Define for Multiple Records + def phcscriptcdn_author_slug + [ + [:authorfirstname, :authorlastname] + ] + end + end -end \ No newline at end of file +end