module Phcscriptcdnpro class Script::Url < ApplicationRecord # Clean URL Initialize extend FriendlyId # Add Paper Trail has_paper_trail # Model Relationships belongs_to :listing, class_name: 'Phcscriptcdnpro::Script::Listing' # Attach to Version (None Nested) belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version' # Attach to Extension (None Nested) belongs_to :extension, class_name: 'Phcscriptcdnpro::Script::Extension' # Clean URL Define friendly_id :id, use: :slugged end end