Sha256: be44563ad371b714a517786b2f86f37d94a281e222f34a039d0a38ccf1bb8f4c

Contents?: true

Size: 452 Bytes

Versions: 12

Compression:

Stored size: 452 Bytes

Contents

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

		# Add Paper Trail
		has_paper_trail

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

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

	end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
phcmemberspro-6.8.10 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.9 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.8 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.7 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.6 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.5 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.4 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.8.0 app/models/phcmemberspro/directory/category.rb
phcmemberspro-6.7.6 app/models/phcmemberspro/directory/category.rb