Sha256: 64fb38f9a1b4a92cf83636d42aa5343836258de4b0d75d43072b9c8c0e4df44f

Contents?: true

Size: 861 Bytes

Versions: 18

Compression:

Stored size: 861 Bytes

Contents

module PhcdevworksMembers
  class Member::Address < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Paper Trail Initialize
    has_paper_trail :class_name => 'PhcdevworksMembers::MemberAddressVersions'

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

    # Form Fields Validation
    validates :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 :phcdev_members_address_nice_urls, use: [:slugged, :finders]

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

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
phcdevworks_members-8.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-7.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.8.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.7.1 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.7.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.6.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.5.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.4.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.3.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.2.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.1.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-6.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-5.1.1 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-5.1.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-5.0.3 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-5.0.2 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-5.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-4.1.0 app/models/phcdevworks_members/member/address.rb