In my Rails app I\'ve run into an issue a couple times that I\'d like to know how other people solve:
I have certain records where a value is optional, so some recor
In my case I needed sort lines by start and end date by ASC, but in few cases end_date was null and that lines should be in above, I used
@invoice.invoice_lines.order('start_date ASC, end_date ASC NULLS FIRST')