[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
|
before_action :default_params
|
||||||
|
|
||||||
def default_params
|
def default_params
|
||||||
params[:order] ||= "created_at"
|
params[resource_name] ||= {
|
||||||
params[:direction] ||= "desc"
|
order: "created_at",
|
||||||
|
direction: "desc"
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
Loading…
Reference in a new issue