Skip to content

Commit

Permalink
Only display events from today or later
Browse files Browse the repository at this point in the history
  • Loading branch information
bonflintstone committed Nov 14, 2024
1 parent 2326bea commit 57f0fbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ def index
selected_organizations = params[:organizations].presence || Event::ORGANIZATIONS

@event_filter = { organizations: selected_organizations }
@events = Event.published.where(organization: selected_organizations).order(datetime: :asc)
@events = Event
.published
.where(organization: selected_organizations)
.where(datetime: Date.today..)
.order(datetime: :asc)
@refetch_event = RefetchEvent.last
end

Expand Down
1 change: 0 additions & 1 deletion config/credentials.yml.enc

This file was deleted.

0 comments on commit 57f0fbf

Please sign in to comment.