Skip to content

Commit

Permalink
fix: each_sliceを削除
Browse files Browse the repository at this point in the history
多分このころgrid layoutを理解していなかったんだと思う
  • Loading branch information
momocus committed Jan 20, 2025
1 parent 703b677 commit ebbea51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/views/sakes/menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
</div>
<div class="col-12">
<div class="row row-cols-1 row-cols-md-2 g-5">
<% @sakes.each_slice(2) do |sake1, sake2| %>
<%= render(partial: "menu_one_drink", locals: { sake: sake1 }) %>
<%= render(partial: "menu_one_drink", locals: { sake: sake2 }) if sake2.present? %>
<% @sakes.find_each do |sake| %>
<%= render(partial: "menu_one_drink", locals: { sake: sake }) %>
<% end %>
</div>
</div>
Expand Down

0 comments on commit ebbea51

Please sign in to comment.