Sha256: acd9e9979950f7c095df98e16c93313b18762caccdd8b157a8199d65d4dfab84

Contents?: true

Size: 221 Bytes

Versions: 3

Compression:

Stored size: 221 Bytes

Contents

module ShoppingCart
  module Countries
    extend ActiveSupport::Concern

    def country_name
      country = ISO3166::Country[country_code]
      country.translations[I18n.locale.to_s] || country.name
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shopping-cart-0.1.2 app/models/concerns/shopping_cart/countries.rb
shopping-cart-0.1.1 app/models/concerns/shopping_cart/countries.rb
shopping-cart-0.1.0 app/models/concerns/shopping_cart/countries.rb