1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00
Maybe/app/models/exchange_rate.rb

7 lines
206 B
Ruby
Raw Normal View History

class ExchangeRate < ApplicationRecord
include Provided
validates :from_currency, :to_currency, :date, :rate, presence: true
validates :date, uniqueness: { scope: %i[from_currency to_currency] }
end