mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
Add validation to security price model
This commit is contained in:
@@ -3,6 +3,8 @@ class Security::Price < ApplicationRecord
|
||||
|
||||
belongs_to :security
|
||||
|
||||
validates :price, :currency, presence: true
|
||||
|
||||
class << self
|
||||
def find_price(security:, date:, cache: true)
|
||||
result = find_by(security:, date:)
|
||||
|
||||
Reference in New Issue
Block a user