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

Move conditional into shared banner partial #4004

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Move conditional into shared banner partial #4004

merged 1 commit into from
Jun 18, 2020

Conversation

decabeza
Copy link
Collaborator

@decabeza decabeza commented May 8, 2020

Objectives

A little refactor to avoid always writing if has_banners? every time the partial shared/banner is used.

Before you have to write:

<% if has_banners? %>
  <%= render "shared/banner" %>
<% end %>

Now it's enough with:

<%= render "shared/banner" %>

😌

To avoid always writing if has_banners? every time the partial is used it has been moved within this partial.
Copy link
Member

@javierm javierm left a comment

Choose a reason for hiding this comment

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

Great 😄. Thanks a lot!

@javierm
Copy link
Member

javierm commented Jun 18, 2020

It looks like I forgot to add this pull request to our project board 🤔. I really hope GitHub implements the option to automatically add new pull requests 😌.

@javierm javierm merged commit e7d557a into master Jun 18, 2020
@javierm javierm deleted the shared-banner branch June 18, 2020 21:39
@javierm javierm self-assigned this Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants