Sha256: f785db14554c2f99999115a6e11dd1aa17d19df0f94e8407d94e210461289a72

Contents?: true

Size: 788 Bytes

Versions: 15

Compression:

Stored size: 788 Bytes

Contents

module Phcmembers
	class Member::Profile < ApplicationRecord

		# Add Paper Trail
		has_paper_trail

		# Gravatar
		include Gravtastic
		gravtastic :memail

		# Model Relationship
		has_many :addresses, class_name: 'Phcmembers::Member::Address'
		has_many :listings, class_name: 'Phcmembers::Member::Listing'

		# Validation for Form Fields
		validates :mfirstname,
			presence: true,
			length: { minimum: 1 }

		validates :mlastname,
			presence: true,
			length: { minimum: 1 }

		validates :mtitle,
			length: { minimum: 2 }

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

		validates :mphone,
			presence: true,
			format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: xxx-xxx-xxxx" }

	end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
phcmembers-8.1.2 app/models/phcmembers/member/profile.rb
phcmembers-8.1.1 app/models/phcmembers/member/profile.rb
phcmembers-8.1.0 app/models/phcmembers/member/profile.rb
phcmembers-8.0.3 app/models/phcmembers/member/profile.rb
phcmembers-8.0.2 app/models/phcmembers/member/profile.rb
phcmembers-8.0.1 app/models/phcmembers/member/profile.rb
phcmembers-8.0.0 app/models/phcmembers/member/profile.rb
phcmembers-7.0.3 app/models/phcmembers/member/profile.rb
phcmembers-7.0.2 app/models/phcmembers/member/profile.rb
phcmembers-7.0.1 app/models/phcmembers/member/profile.rb
phcmembers-7.0.0 app/models/phcmembers/member/profile.rb
phcmembers-6.7.5 app/models/phcmembers/member/profile.rb
phcmembers-6.7.4 app/models/phcmembers/member/profile.rb
phcmembers-6.7.3 app/models/phcmembers/member/profile.rb
phcmembers-6.7.2 app/models/phcmembers/member/profile.rb