Sha256: f404a9b99f2e64c5ef25f2398338bef40c05e2e89522b06f190be91ceec3c055

Contents?: true

Size: 704 Bytes

Versions: 10

Compression:

Stored size: 704 Bytes

Contents

module Phcmemberspro
	class Members::Contact < ActiveRecord::Base

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

		# Model Relationships
		belongs_to :main, class_name: 'Members::Main'

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

		validates :mccompanyname,
			presence: true,
			length: { minimum: 2 }

		validates :mccity,
			presence: true,
			length: { minimum: 3 }

		validates :mcprovince,
			presence: true,
			length: { minimum: 2 }
			
		validates :mccountry,
			presence: true,
			length: { minimum: 2 }

		validates :mcpostalcode,
			presence: true,
			length: { minimum: 6 }

	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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