Class: SpreeCmCommissioner::CurrencyRate

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree_cm_commissioner/currency_rate.rb

Class Method Summary collapse

Class Method Details

.by_pair(from, to) ⇒ Object



11
12
13
# File 'app/models/spree_cm_commissioner/currency_rate.rb', line 11

def self.by_pair(from, to)
  where(from_currency: from.upcase, to_currency: to.upcase, status: 'active')
end