Merge pull request #2961 from betagouv/fix-2867

[Fix #2867] fix default sort for administrate
This commit is contained in:
gregoirenovel 2018-11-06 19:29:37 +01:00 committed by GitHub
commit a499467f27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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