Skip to content

Commit

Permalink
Add Item Listings Page
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasUCSB committed Nov 15, 2024
1 parent 26b7925 commit efdb152
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/views/item/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
<h2>Listings: </h2>
<ul>
<% @items.each do |item| %>
<li><%= item.name %></li>
<li>
<div class="item">
<h2><%= item.name %></h2>
<p><strong>Description:</strong> <%= item.description %></p>
<p><strong>Price:</strong> <%= number_to_currency(item.price) %></p>
<p><strong>Seller:</strong> <%= item.user.username %></p>
<p><strong>Rating:</strong> TODO</p>
</div>
</li>
<% end %>
</ul>

0 comments on commit efdb152

Please sign in to comment.