Sha256: 4870e1c12cec8a0e6388b32c8fe6a5dc4b05e8003919f654ce5c23513016f420
Contents?: true
Size: 944 Bytes
Versions: 8
Compression:
Stored size: 944 Bytes
Contents
module Phcmemberspro class Member::Address < ApplicationRecord # Clean URL Initialize extend FriendlyId # Add Paper Trail has_paper_trail # Model Relationships belongs_to :profile, class_name: 'Phcmemberspro::Member::Profile' # Validation for Form Fields validates :mcaddressl1, presence: true, length: { minimum: 2 } validates :mccity, length: { minimum: 3 } validates :mcprovince, presence: true, length: { minimum: 2 } validates :mccountry, presence: true, length: { minimum: 2 } validates :mcpostalcode, presence: true, length: { minimum: 3 } validates :mctype, presence: true, length: { minimum: 2 } # Clean URL Define friendly_id :phcmembers_address_slug, use: :slugged # Define for Multiple Records def phcmembers_address_slug [ [:id, :mcaddressl1, :mccity, :mcprovince] ] end end end
Version data entries
8 entries across 8 versions & 1 rubygems