1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-21 06:09:38 +02:00
Maybe/app/models/security/synth_combobox_option.rb

14 lines
417 B
Ruby
Raw Normal View History

class Security::SynthComboboxOption
include ActiveModel::Model
attr_accessor :symbol, :name, :logo_url, :exchange_acronym, :exchange_mic, :exchange_country_code
def id
"#{symbol}|#{exchange_mic}|#{exchange_acronym}|#{exchange_country_code}" # submitted by combobox as value
end
def to_combobox_display
"#{symbol} - #{name} (#{exchange_acronym})" # shown in combobox input when selected
end
end