Skip to content

Commit c0dbcfe

Browse files
committed
fix: filter for upcoming events in #dashboard
In ac423bb, we implemented eager_load but unfortunately dropped the `upcoming` method. This change puts it back. Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
1 parent 57f2524 commit c0dbcfe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/controllers/dashboard_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def total_upcoming_events_count
8787
end
8888

8989
def upcoming_events_for_user
90-
chapter_workshops = Workshop.eager_load(:chapter, :sponsors, :organisers, :permissions)
90+
chapter_workshops = Workshop.upcoming
91+
.eager_load(:chapter, :sponsors, :organisers, :permissions)
9192
.where(chapter: current_user.chapters)
9293
.to_a
9394

0 commit comments

Comments
 (0)