Sha256: 2fe97050f30e3aea1179630c55538779b96ca56ffec04eeea1aced9c7aea6ba5

Contents?: true

Size: 505 Bytes

Versions: 111

Compression:

Stored size: 505 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::Listing'

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

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

	end
end

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
phcmemberspro-2.2.3 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.2.1 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.2.0 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.9 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.8 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.7 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.6 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.4 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.3 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.2 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-2.1.0 app/models/phcmemberspro/directory/catlist.rb