Sha256: 44a072e1adb38fc796c064c7663f7336933c3f9acb3cfac0e41d57c0c326ecb5

Contents?: true

Size: 371 Bytes

Versions: 10

Compression:

Stored size: 371 Bytes

Contents

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

		# Mtdevise Scope
		def self.scoped_to(account)
			where(:account_id => account.id)
		end

		# Model Relationship
		has_many :catlists, class_name: 'Directory::Catlist'

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

	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
phcmemberspro-1.5.8 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.5.7 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.5.6 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.5.5 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.6 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.5 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.3 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.2 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.1 app/models/phcmemberspro/directory/category.rb
phcmemberspro-1.0.0 app/models/phcmemberspro/directory/category.rb