app/models/phcscriptcdnpro/script/listing.rb in phcscriptcdnpro-8.0.1 vs app/models/phcscriptcdnpro/script/listing.rb in phcscriptcdnpro-8.0.2
- old
+ new
@@ -1,9 +1,10 @@
module Phcscriptcdnpro
class Script::Listing < ApplicationRecord
- # Relationships
+ # Clean URL Initialize
+ extend FriendlyId
# Attach to URL (Nested)
has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
# Attach to Author (None Nested)
@@ -13,7 +14,10 @@
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
+
end
-end
\ No newline at end of file
+end