Sha256: 9a316d8257845e0e135ff777be9707d5efb50b0080dfba29850aedd7aa50aa15

Contents?: true

Size: 807 Bytes

Versions: 11

Compression:

Stored size: 807 Bytes

Contents

module Phcmembers
  class Member::Address < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

		# Paper Trail Initialize
    has_paper_trail :class_name => 'Phcmembers::AddressVersions'

    # Relationships
    belongs_to :profile, class_name: 'Phcmembers::Member::Profile'

    # Form Fields Validation
    validates :address_address_line_1,
      presence: true

    validates :address_city,
      presence: true

    validates :address_province,
      presence: true

    validates :address_country,
      presence: true

    validates :address_postal_code,
      presence: true

    # Clean URL Define
    friendly_id :phc_nice_url_slug, use: [:slugged, :finders]

    def phc_nice_url_slug
      [
        [:address_city, :address_province, :address_type]
      ]
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
phcmembers-68.0.3 app/models/phcmembers/member/address.rb
phcmembers-68.0.2 app/models/phcmembers/member/address.rb
phcmembers-68.0.1 app/models/phcmembers/member/address.rb
phcmembers-68.0.0 app/models/phcmembers/member/address.rb
phcmembers-67.5.0 app/models/phcmembers/member/address.rb
phcmembers-67.4.0 app/models/phcmembers/member/address.rb
phcmembers-67.3.0 app/models/phcmembers/member/address.rb
phcmembers-67.1.0 app/models/phcmembers/member/address.rb
phcmembers-67.0.0 app/models/phcmembers/member/address.rb
phcmembers-66.0.0 app/models/phcmembers/member/address.rb
phcmembers-65.0.0 app/models/phcmembers/member/address.rb