app/models/phcmemberspro/directory/category.rb in phcmemberspro-21.3.0 vs app/models/phcmemberspro/directory/category.rb in phcmemberspro-22.0.0

- old
+ new

@@ -1,29 +1,28 @@ module Phcmemberspro class Directory::Category < ApplicationRecord - # Clean URL Initialize - extend FriendlyId + # Clean URL Initialize + extend FriendlyId - # Add Paper Trail - has_paper_trail + # Paper_tail Initialize + has_paper_trail :class_name => 'Phcmemberspro::CategoryVersions' - # Model Relationships + # Relationships has_many :categorylistings, class_name: 'Phcmemberspro::Directory::Categorylisting', dependent: :destroy has_many :listings, class_name: 'Phcmemberspro::Member::Listing', :through => :categorylistings validates :catname, - length: { minimum: 3 } + length: { minimum: 3 } # Clean URL Define - friendly_id :phcmembers_category_slug, use: [:slugged, :finders] + friendly_id :phcmemberspro_category_slug, use: [:slugged, :finders] - # Define for Multiple Records - def phcmembers_category_slug - [ - :catname, - [:catname, :id] - ] - end + # Define for Multiple Records + def phcmemberspro_category_slug + [ + :catname + ] + end - end + end end