除了使用 default_scope 作为资源索引页面之外,如何让 ActiveAdmin index 页面默认对特定列进行排序?我尝试了很多东西,但都没有用。
最佳答案
来自 active admin index page documentation :
索引默认排序顺序 您可以为索引页面定义默认排序顺序:
ActiveAdmin.register Post do
config.sort_order = "name_asc"
end
关于ruby-on-rails - ActiveAdmin 排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12450779/