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