mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 08:09:38 +02:00
Initial pass at Synth-based ticker selection (#1392)
* Initial pass at Synth-based ticker selection * Update _tickers.turbo_stream.erb * Functional combobox display * A few cleanup steps * Linter * Prevent long strings * Another step towards functional combobox * Deprecated files * Custom Combobox implementation * Lint * Test suite fixes * Lint * Make direct use of mic codes * Update splits * Update trades_test.rb
This commit is contained in:
parent
490f44589e
commit
cd91e66618
20 changed files with 118 additions and 232 deletions
|
@ -31,8 +31,9 @@ class Account::TradeBuilder < Account::EntryBuilder
|
|||
end
|
||||
|
||||
def security
|
||||
return Security.find(ticker) if ticker.match?(/\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i)
|
||||
Security.find_or_create_by(ticker: ticker)
|
||||
ticker_symbol, exchange_mic = ticker.split("|")
|
||||
|
||||
Security.find_or_create_by(ticker: ticker_symbol, exchange_mic: exchange_mic)
|
||||
end
|
||||
|
||||
def amount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue