app/models/phcscriptcdnpro/script/listing.rb in phcscriptcdnpro-14.1.0 vs app/models/phcscriptcdnpro/script/listing.rb in phcscriptcdnpro-15.0.0

- old
+ new

@@ -3,24 +3,25 @@ # Clean URL Initialize extend FriendlyId # Add Paper Trail - has_paper_trail + has_paper_trail :class_name => 'Phcscriptcdnpro::ListingVersions' - # Model Relationships + # Relationships has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url' - - # Attach to Author (None Nested) belongs_to :author, class_name: 'Phcscriptcdnpro::Script::Author' - - # Attach to Version (None Nested) belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version' - - # Attach to Licence (None Nested) belongs_to :licence, class_name: 'Phcscriptcdnpro::Script::Licence' # Clean URL Define - friendly_id :scripttitle, use: :slugged + friendly_id :phcscriptcdnpro_listing_slug, use: [:slugged, :finders] + + # Define for Multiple Records + def phcscriptcdnpro_listing_slug + [ + [:scripttitle] + ] + end end end