Sha256: 59154926788e70da029734fd07786c2b443ba48ad4950a2426f493cedf66f7ff
Contents?: true
Size: 911 Bytes
Versions: 6
Compression:
Stored size: 911 Bytes
Contents
module PhcdevworksMembers class Member::Address < ApplicationRecord # Clean URL Initialize extend FriendlyId # Paper Trail Initialize has_paper_trail :class_name => 'PhcdevworksMembers::AddressVersions' # 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 :phcdev_members_address_nice_urls, use: [:slugged, :finders] def phcdev_members_address_nice_urls [ [:member_address_type, :member_address_city, :member_address_province] ] end end end
Version data entries
6 entries across 6 versions & 1 rubygems