Sha256: 0593deaa381c37fb0c1e05fd25faea2497f047751571c841d4b4cc0f9a34ac6b
Contents?: true
Size: 628 Bytes
Versions: 4
Compression:
Stored size: 628 Bytes
Contents
module Phcmembers class Directory::Category < ApplicationRecord # Clean URL Initialize extend FriendlyId # Paper_tail Initialize has_paper_trail :class_name => 'Phcmembers::CategoryVersions' # Relationships has_and_belongs_to_many :listings, class_name: 'Phcmembers::Member::Listing', :join_table => 'categories_listings', :dependent => :destroy validates :category_name, length: { minimum: 3 } # Clean URL Define friendly_id :phcmembers_category_slug, use: [:slugged, :finders] # Define for Multiple Records def phcmembers_category_slug [ :category_name ] end end end
Version data entries
4 entries across 4 versions & 1 rubygems