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

Version Path
phcmemberspro-76.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-74.1.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-74.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-73.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-72.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-71.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-70.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-69.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-68.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-67.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-66.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-65.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-64.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-63.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-62.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-61.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-60.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-59.0.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-59.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-58.0.0 app/models/phcmemberspro/directory/category.rb