Sha256: 1c9d410e3b93385a914d4f4823de66f876e737321cdfe125614e0ba2bb3d22d7
Contents?: true
Size: 1.24 KB
Versions: 59
Compression:
Stored size: 1.24 KB
Contents
<p id="notice"><%= notice %></p> <h1>Listing Auth Shopping Carts</h1> <table> <thead> <tr> <!-- id number, this will also hold links to edit and destroy. --> <th>Number</th> <th>Id Number</th> <!-- get the names of the other fields to be shown--> <% @auth_shopping_carts.first.attributes_to_show.each do |attr| %> <th><%= attr %></th> <% end %> </tr> </thead> <tbody> <% @auth_shopping_carts.each_with_index {|auth_shopping_cart,key| %> <tr> <td><%= key + 1 %></td> <td> <div> <%= link_to auth_shopping_cart.id.to_s, cart_path(auth_shopping_cart) %> </div> <div> <!-- add destory and edit options here --> <!-- end --> <span><%= link_to 'Edit', edit_cart_path(auth_shopping_cart) %></span> <span><%= link_to 'Destroy', cart_path(auth_shopping_cart), method: :delete, data: { confirm: 'Are you sure?' } %></span> </div> </td> <% @auth_shopping_carts.first.attributes_to_show.each do |attr| %> <td><%= auth_shopping_cart.send("#{attr}") %></td> <% end %> </tr> <% } %> </tbody> </table> <br> <%= link_to 'New Cart', new_cart_path %>
Version data entries
59 entries across 59 versions & 1 rubygems