mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* User tickers as primary lookup symbol instead of isin * Add security price provider * Fetch security prices in bulk to improve sync performance * Fetch prices in bulk, better mocking for tests
9 lines
236 B
Ruby
9 lines
236 B
Ruby
module SecuritiesTestHelper
|
|
def create_security(ticker, prices:)
|
|
prices.each do |price|
|
|
Security::Price.create! ticker: ticker, date: price[:date], price: price[:price]
|
|
end
|
|
|
|
Security.create! ticker: ticker
|
|
end
|
|
end
|