Sha256: ec2591a113141775713a8d967b2141a828fc35dc15409fce0a46611a039a78d4

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

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

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

		# Model Relationship
		belongs_to :category, class_name: 'Directory::Category'
		belongs_to :listing, class_name: 'Members::Business'

		# Validation for Form Fields (More of a Self-Check)
		validates :business_id,
			presence: true

		# Validation for Form Fields (More of a Self-Check)
		validates :category_id,
			presence: true

	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phcmemberspro-5.2.1 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.2.0 app/models/phcmemberspro/directory/catlist.rb