Sha256: eb65a5801e06196a46994770af83c1b072ddd6192b6dc0933442fd6e060cc87e

Contents?: true

Size: 816 Bytes

Versions: 12

Compression:

Stored size: 816 Bytes

Contents

module Phcmemberspro
  class Member::Address < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

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

    # Relationships
    belongs_to :profile, class_name: 'Phcmemberspro::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

12 entries across 12 versions & 1 rubygems

Version Path
phcmemberspro-92.0.3 app/models/phcmemberspro/member/address.rb
phcmemberspro-92.0.2 app/models/phcmemberspro/member/address.rb
phcmemberspro-92.0.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-92.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-91.4.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-91.3.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-91.2.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-91.1.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-91.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-90.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-89.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-88.0.0 app/models/phcmemberspro/member/address.rb