Sha256: 038baa4f81fe85fbf16ead3fecd3b107bce64265a6cef686f59ec00fefc2b41d
Contents?: true
Size: 700 Bytes
Versions: 57
Compression:
Stored size: 700 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_many :categorylistings, class_name: 'Phcmemberspro::Directory::Categorylisting', dependent: :destroy has_many :listings, class_name: 'Phcmemberspro::Member::Listing', :through => :categorylistings 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
57 entries across 57 versions & 1 rubygems