Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
Fix past events order
Browse files Browse the repository at this point in the history
  • Loading branch information
EricPickup committed May 9, 2019
1 parent b5a917b commit 233f05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def destroy

def index
@future_events = Event.select { |event| event.start_date.future? }.sort_by &:start_date
@past_events = Event.select { |event| event.start_date.past? }.last(5)
@past_events = (Event.select { |event| event.start_date.past? }.sort_by &:start_date).reverse.first(5)
end

def new
Expand Down

0 comments on commit 233f05c

Please sign in to comment.