Skip to content

Commit f0166c5

Browse files
committed
fix: ソート順を地理的順序に改善
- 同じ日付の道場をIDではなくorderでソート(地理的にまとまる)
1 parent 715a2f8 commit f0166c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/dojos_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def activity
133133
}
134134
end
135135

136-
# Sort by latest event date (or created_at if no events) && older Dojo ID if same date
136+
# Sort by latest event date (or created_at if no events) && Dojo's order if same date
137137
@latest_event_by_dojos.sort_by! do |dojo|
138138
sort_date = dojo[:latest_event_at] || dojo[:note_date] || dojo[:created_at]
139-
[sort_date, dojo[:id]]
139+
[sort_date, dojo[:order]]
140140
end
141141
end
142142
end

0 commit comments

Comments
 (0)