You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just an idea. There is undocumented feature for MySQL https://troels.arvin.dk/db/rdbms/#select-order_by. We can use it to implement similar to PostgreSQL behavior. I know this is not the best practice to depend on undocumented feature... just an idea
Option 2
scope:sort_by_priority_null_asc,->{order(Arel.sql('priority IS NULL ASC, priority ASC'))}scope:sort_by_priority_null_desc,->{order(Arel.sql('priority IS NULL ASC, priority DESC'))}
For example
nulls_always_last
in MySQL can be simulated like thisOption 1
Just an idea. There is undocumented feature for MySQL https://troels.arvin.dk/db/rdbms/#select-order_by. We can use it to implement similar to PostgreSQL behavior. I know this is not the best practice to depend on undocumented feature... just an idea
Option 2
Option 3
rails/rails#42245
The text was updated successfully, but these errors were encountered: