Use local variable in cards partial

This way it's going to be easier to reuse.
This commit is contained in:
Javi Martín
2021-01-13 14:14:16 +01:00
parent 3e74f4ab67
commit 5907ddf884
3 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
<% if @cards.any? %>
<div class="small-12 column">
<%= render "shared/cards" %>
<%= render "shared/cards", cards: @cards %>
</div>
<% end %>

View File

@@ -1,6 +1,6 @@
<div class="row">
<div class="cards-container">
<% @cards.each do |card| %>
<% cards.each do |card| %>
<%= render "shared/card", card: card %>
<% end %>
</div>

View File

@@ -21,7 +21,7 @@
<div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">
<h2 class="title"><%= t("welcome.cards.title") %></h2>
<%= render "shared/cards" %>
<%= render "shared/cards", cards: @cards %>
</div>
<% end %>