app/models/phcmemberspro/members/contact.rb in phcmemberspro-3.0.5 vs app/models/phcmemberspro/members/contact.rb in phcmemberspro-3.0.6
- old
+ new
@@ -5,17 +5,16 @@
def self.scoped_to(account)
where(:account_id => account.id)
end
# Translate Country Code to Name
- def contact_country_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'
- before_create :contact_country_name
# Validation for Form Fields
validates :mccontactname,
presence: true,
length: { minimum: 3 }