Sha256: 5b92c760bdbd0aa6029f1e53b5506519ff7e1721402c24c323e9c2c6d740207a

Contents?: true

Size: 437 Bytes

Versions: 20

Compression:

Stored size: 437 Bytes

Contents

module Phcmemberspro
	class Directory::Category < ActiveRecord::Base

		# Add Paper Trail
		has_paper_trail

		# Model Relationship
		has_many :listings, class_name: 'Directory::Listing', dependent: :destroy
		has_many :businesses, class_name: 'Members::Business', :through => :listings

		# Validation for Form Fields
		validates :catname,
			presence: true,
			uniqueness: {scope: :oganization_id},
			length: { minimum: 3 }

	end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
phcmemberspro-8.6.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.6.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.6.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.6.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.9 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.8 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.7 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.6 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.5 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.4 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.5.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.0.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-8.0.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-7.9.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-7.9.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-7.8.14 app/models/phcmemberspro/directory/category.rb
phcmemberspro-7.8.12 app/models/phcmemberspro/directory/category.rb