[Fix #2867] fix default sort for administrate
This commit is contained in:
parent
c1d017193c
commit
62c01706df
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