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-5.1.5 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.1.4 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.1.3 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.1.2 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.1.1 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.1.0 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.6 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.5 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.4 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.3 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.2 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.1 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-5.0.0 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.11.2 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.11.1 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.11.0 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.10.10 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.10.9 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.10.8 app/models/phcmemberspro/directory/catlist.rb
phcmemberspro-4.10.7 app/models/phcmemberspro/directory/catlist.rb