Sha256: 7cf0ef52ed88087409b862ebf6ce5654a25c9e7fdb553c2a3cd14d6c7ab25e52

Contents?: true

Size: 691 Bytes

Versions: 24

Compression:

Stored size: 691 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
			[
				:catname
			]
		end

	end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
phcmemberspro-35.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-34.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-33.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-32.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-31.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-30.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-29.2.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-29.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-29.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-28.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-27.2.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-27.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-27.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-26.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-25.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-25.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-24.2.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-24.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-24.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-23.1.0 app/models/phcmemberspro/directory/category.rb