Sha256: fcfc1501cce182397f74a4fad093a210bd4b12bdf2029dfd202bcda65307d529
Contents?: true
Size: 621 Bytes
Versions: 11
Compression:
Stored size: 621 Bytes
Contents
module Phcmemberspro class Members::Contact < ActiveRecord::Base # Translate Country Code to Name def country_name country = ISO3166::Country[mccountry] country.translations[I18n.locale.to_s] || country.name end # Model Relationships belongs_to :main, class_name: 'Members::Main' # Validation for Form Fields validates :mccity, presence: true, length: { minimum: 3 } validates :mcprovince, presence: true, length: { minimum: 2 } validates :mccountry, presence: true, length: { minimum: 2 } validates :mcpostalcode, presence: true, length: { minimum: 6 } end end
Version data entries
11 entries across 11 versions & 1 rubygems