Sha256: 49538e5c51b839c611877dc8a95fbc8ee81021904c8bd2bd701922fd410360d6
Contents?: true
Size: 616 Bytes
Versions: 15
Compression:
Stored size: 616 Bytes
Contents
module Phcmemberspro class Directory::Category < ApplicationRecord # Clean URL Initialize extend FriendlyId # Paper_tail Initialize has_paper_trail :class_name => 'Phcmemberspro::CategoryVersions' # Relationships has_and_belongs_to_many :listings, class_name: 'Phcmemberspro::Member::Listing', :join_table => 'categories_listings' validates :catname, length: { minimum: 3 } # Clean URL Define friendly_id :phcmemberspro_category_slug, use: [:slugged, :finders] # Define for Multiple Records def phcmemberspro_category_slug [ :org_id, :catname ] end end end
Version data entries
15 entries across 15 versions & 1 rubygems