We were passing a hash of options instead of converting them to keyword parameters, which resulted in warnings on Ruby 2.7: ``` app/components/admin/table_actions_component.html.erb:5: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call app/components/admin/table_actions_component.html.erb:9: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call app/components/admin/widget/cards/row_component.html.erb:20: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call app/components/admin/widget/cards/table_component.html.erb:14: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call ```
23 lines
637 B
Plaintext
23 lines
637 B
Plaintext
<% if cards.any? %>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= attribute_name(:title) %></th>
|
|
<th class="small-4"><%= attribute_name(:description) %></th>
|
|
<th><%= attribute_name(:link_text) %> / <%= attribute_name(:link_url) %></th>
|
|
<th><%= t("admin.shared.image") %></th>
|
|
<th><%= t("admin.shared.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% cards.each do |card| %>
|
|
<%= render Admin::Widget::Cards::RowComponent.new(card, **options) %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<div class="callout primary clear">
|
|
<%= no_cards_message %>
|
|
</div>
|
|
<% end %>
|