gregbell/active_admin — Issue #909: Let pass multiple columns to sortable
Author: behrangsa
Created: 2012-01-16 04:35:31+00:00
State: open

Hi,

I have a column that displays values of a virtual attribute `full_name` that is composed of multiple fields `first_name` and `last_name`. Right now there's no way to sort ascending or descending using both columns. If I specify:

```ruby
:sortable => "timesheet_user.first_name, timesheet_user.last_name"
```

The generated link for sorting would become:

```
order=user.first_name%2C+user.last_name_desc
```

But it should become something like

```
order=user.first_name_desc%2C+user.last_name_desc
```

It would be nice if we can pass multiple columns to sortable like this:

```ruby
:sortable => ["timesheet_user.first_name", "timesheet_user.last_name"]
```

In order to be able to sort based on multiple columns.