Class: Currency

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/currency.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultObject



6
7
8
# File 'app/models/currency.rb', line 6

def self.default
  Currency.find_by_default(true)
end

Instance Method Details

#to_exchanges_rate(currency) ⇒ Object



10
11
12
# File 'app/models/currency.rb', line 10

def to_exchanges_rate(currency)
  to_exchanges_rates.find_by_to_currency_id(currency.id)
end