Sha256: ce86c581c6b9355fa58e2d1039b260b533f0fcb52995f5be37e9081fcff39b4b

Contents?: true

Size: 571 Bytes

Versions: 3

Compression:

Stored size: 571 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'

		validates :catname,
		  length: { minimum: 3 }

		# Clean URL Define
		friendly_id :phcmembers_category_slug, use: [:slugged, :finders]

		# Define for Multiple Records
		def phcmembers_category_slug
			[:catname]
		end

	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phcmembers-61.5.0 app/models/phcmembers/directory/category.rb
phcmembers-61.4.0 app/models/phcmembers/directory/category.rb
phcmembers-61.3.0 app/models/phcmembers/directory/category.rb