Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use render collection to for main page #2083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rukomoynikov
Copy link
Contributor

No description provided.

@@ -71,7 +71,7 @@
%h2.h3.mb-4= t('homepage.events.upcoming')
- @upcoming_workshops.each do |date, workshops|
%h3.h5= date
= render workshops
= render collection: workshops, partial: "events/event"
Copy link
Contributor

@matyikriszta matyikriszta Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rukomoynikov can you please explain how this improves the code. Is it that it's easier to read or are there performance implications? The = render workshops pattern is used in a bunch of other files, such as app/views/chapter/show.html.haml, app/views/dashboard/dashboard.html.haml and app/views/events/_events.html.haml. I'm not against this change (I think it makes it clearer what partial is being used to render the event cards) but if we are going to update here we should update everywhere else and get rid of the app/views/workshops/_workshop.html.haml partial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants