Skip to content

Commit 4ae2277

Browse files
committed
Add the method call to the ChapterController
There feels like a lot of repetition here, but I can't figure out how to remove it right now Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
1 parent c32fef6 commit 4ae2277

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/controllers/chapter_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def show
1010
@latest_workshops = event_presenters_by_date(past_events)
1111

1212
@recent_sponsors = Sponsor.recent_for_chapter(@chapter)
13+
@attending_ids = MemberPresenter.new(current_user).attending_workshops
1314
end
1415

1516
private

app/views/chapter/show.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
%h2.mb-4= t('homepage.events.upcoming')
2929
- @upcoming_workshops.each do |date, workshops|
3030
%h3.h5= date
31-
= render workshops
31+
= render workshops, attending_ids: @attending_ids
3232

3333
- if @latest_workshops.any?
3434
.pt-4
3535
%h2.mb-4 Past Events
3636
- @latest_workshops.each do |date, workshops|
37-
= render workshops
37+
= render workshops, attending_ids: @attending_ids
3838

3939
- if @recent_sponsors.any?
4040
.py-4.py-lg-5.bg-light

0 commit comments

Comments
 (0)