Open scarroll32 opened 1 year ago
@itsalongstory is there a bug here or am I missing something? 🤔
@itsalongstory is there a bug here or am I missing something? 🤔
It's not a bug, configuration is setting for ASC
ASC NULLS FIRST
= DESC NULLS LAST
You may need set it to :nulls_always_first
or :nulls_always_last
In this MR default sort for NULLS FIRST or NULLS LAST was added, but the order seems to be reversed.
When adding to
config/initilizers/ransack.rb
:It produces this SQL:
Then when the setting is reversed:
This is the SQL: