Question: For most models, the default sort order (id desc) is fine. But for a couple of scopes on one of my models, it would make more sense to reverse the order, or order by the updated\_at field.

I seem unable to achieve this without breaking other functionality, so I'm hoping someone else might teach me how to do this!

I've tried adding a .order() on the objects I'm returning:

```
scope :example do |models|
  models.order('id asc')
end

```

This does not seem to have any effect.

I've also tried unscoping, which kind of works. It does sort my objects the way I want to, but it completely breaks all filtering/search functionality.

```
scope :example do |models|
  models.unscoped.order('id asc')
end

```

What to do?

Answer: 
use config.sort\_order like:

```
config.sort_order = "updated_at_desc"

```
Why not make 2 scopes in your model, one for a particular sort order, the other, reversed, then in ActiveAdmin set one as the default?

```
scope :example_asc, :default => true
scope :example_desc

```

If that doesn't work for you, perhaps create a controller block in ActiveAdmin that defines what you're trying to do:

```
controller do
  def asc
    Model.order('id ASC')
  end
  def desc
    Model.order('id DESC')
  end
end

scope :example do |models|
  asc
end

scope :example do |models|
  desc
end

```

And finally, I think this answer is probably fairly accurate: <https://stackoverflow.com/a/17612718/175825>

But you might want to investigate more about how you can implement `sort_order`:

* <https://github.com/gregbell/active_admin/blob/master/lib/active_admin/dsl.rb#L25>
* <https://github.com/gregbell/active_admin/blob/master/lib/active_admin/dsl.rb#L97>

For what it's worth, I'm not a fan of ActiveAdmin's skinny docs. Good luck.