Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveAdmin Sorting

How do you get ActiveAdmin index page to sort a certain column on default beside using default_scope for the resource index page? I tried many things and none works.

like image 260
RubyFanatic Avatar asked Dec 27 '22 17:12

RubyFanatic


1 Answers

from active admin index page documentation:

Index default sort order You can define the default sort order for index pages:

ActiveAdmin.register Post do
  config.sort_order = "name_asc"
end
like image 54
sorens Avatar answered Jan 04 '23 20:01

sorens