Skip to content

Commit 0f4de9a

Browse files
committed
Fix schools dashboard default ordering
1 parent 5c72bc1 commit 0f4de9a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/controllers/admin/schools_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,13 @@ def reject_school
3838

3939
redirect_to admin_school_path(id: school_id)
4040
end
41+
42+
def default_sorting_attribute
43+
:created_at
44+
end
45+
46+
def default_sorting_direction
47+
:desc
48+
end
4149
end
4250
end

app/dashboards/school_dashboard.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,4 @@ class SchoolDashboard < Administrate::BaseDashboard
9696
def display_resource(school)
9797
school.name.to_s
9898
end
99-
100-
def default_sorting_attribute
101-
:created_at
102-
end
103-
104-
def default_sorting_direction
105-
:desc
106-
end
10799
end

0 commit comments

Comments
 (0)