Class: Phcmemberspro::Members::Listing
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Phcmemberspro::Members::Listing
- Defined in:
- app/models/phcmemberspro/members/listing.rb
Class Method Summary collapse
-
.scoped_to(account) ⇒ Object
Account Scope.
Instance Method Summary collapse
-
#country_name ⇒ Object
Translate Country Code to Name.
Class Method Details
.scoped_to(account) ⇒ Object
Account Scope
5 6 7 |
# File 'app/models/phcmemberspro/members/listing.rb', line 5 def self.scoped_to(account) where(:account_id => account.id) end |
Instance Method Details
#country_name ⇒ Object
Translate Country Code to Name
10 11 12 13 |
# File 'app/models/phcmemberspro/members/listing.rb', line 10 def country_name country = ISO3166::Country[mlcountry] country.translations[I18n.locale.to_s] || country.name end |