Sha256: 6142077caa68447220b8a7d3bf5fc8733d6b9ba4f86d420bfd8fdbdacb92c964

Contents?: true

Size: 903 Bytes

Versions: 12

Compression:

Stored size: 903 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 :member_address_line_1,
      presence: true

    validates :member_address_city,
      presence: true

    validates :member_address_province,
      presence: true

    validates :member_address_country,
      presence: true

    validates :member_address_postal_code,
      presence: true

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

    def members_address_nice_urls
      [
        [:member_address_type, :member_address_city, :member_address_province]
      ]
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
phcdevworks_members-11.1.1 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.5 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.4 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.3 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.2 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.1 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-11.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-10.4.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-10.3.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-10.1.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-10.0.0 app/models/phcdevworks_members/member/address.rb
phcdevworks_members-9.0.0 app/models/phcdevworks_members/member/address.rb