mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
Enhance currency selector to list 'All Others' after 'Popular' (#610)
This commit is contained in:
parent
b5c56f7775
commit
b812b6d8c9
3 changed files with 35 additions and 1 deletions
|
@ -26,6 +26,10 @@ class Money::Currency
|
|||
@all ||= YAML.load_file(CURRENCIES_FILE_PATH)
|
||||
end
|
||||
|
||||
def all_instances
|
||||
all.values.map { |currency_data| new(currency_data["iso_code"]) }
|
||||
end
|
||||
|
||||
def popular
|
||||
all.values.sort_by { |currency| currency["priority"] }.first(12).map { |currency_data| new(currency_data["iso_code"]) }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue