Module: Gera::MoneySupport
- Defined in:
- lib/gera/money_support.rb
Defined Under Namespace
Modules: CurrencyExtend
Class Method Summary collapse
Class Method Details
.init ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gera/money_support.rb', line 3 def self.init # Убираем все валюты Money::Currency.all.each do |cur| Money::Currency.unregister cur.id.to_s end Psych.load( File.read CURRENCIES_PATH ).each { |key, cur| Money::Currency.register cur.symbolize_keys } # Создают константы-валюты, типа RUB, USD и тп Money::Currency.all.each do |cur| Object.const_set cur.iso_code, cur end # Gera::Hooks.init end |