Skip to content

Commit 5c72bc1

Browse files
committed
Add created_at to schools dashboard index, default order by this
1 parent 28e916a commit 5c72bc1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/dashboards/school_dashboard.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class SchoolDashboard < Administrate::BaseDashboard
3838
name
3939
reference
4040
country_code
41+
created_at
4142
verified_at
4243
rejected_at
4344
].freeze
@@ -95,4 +96,12 @@ class SchoolDashboard < Administrate::BaseDashboard
9596
def display_resource(school)
9697
school.name.to_s
9798
end
99+
100+
def default_sorting_attribute
101+
:created_at
102+
end
103+
104+
def default_sorting_direction
105+
:desc
106+
end
98107
end

0 commit comments

Comments
 (0)