Closed wayne5540 closed 8 years ago
The plugin does not support multiple order by
currently.
There is some voodoo magic you can do to use multiple order clauses:
In stead of setting the order in the initialize_grid method call you set in on the ar_options
object of the grid itself.
@task_grid = initialize_grid(Task)
@task_grid.ar_options[:order] = "ship_date ASC, priority ASC, updated_at DESC"
This setting will be overridden if another order is set via the URL.
This is of course not part of the official API so it may break in the future...
For example, how to add query like this:
Thanks.