This:
- book.prices.order(:currency_code).each do |price|
returns all a book's prices ordered alphabetically by currency code:
AUD 19.99
GBP 9.99
NZD 26.00
USD 14.95
Now, how can I neatly get GBP to always appear at the top of the list, with the others sorting alphabetically, like this:
GBP 9.99
AUD 19.99
NZD 26.00
USD 14.95
This answer shows the SQL solution, but I'm not sure about the Rails way.