Merge pull request #2961 from betagouv/fix-2867
[Fix #2867] fix default sort for administrate
This commit is contained in:
commit
a499467f27
1 changed files with 4 additions and 2 deletions
|
@ -4,8 +4,10 @@ module Manager
|
|||
before_action :default_params
|
||||
|
||||
def default_params
|
||||
params[:order] ||= "created_at"
|
||||
params[:direction] ||= "desc"
|
||||
params[resource_name] ||= {
|
||||
order: "created_at",
|
||||
direction: "desc"
|
||||
}
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
Loading…
Reference in a new issue