X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fviews%2Fmerchandise%2Flist.rhtml;h=91e8f5ee7bf56f5c35b7b53d9844524bae73f4cc;hb=refs%2Ftags%2Fturned-in;hp=a328f09f8d2f015f023e70917eb3c3b8fa98280d;hpb=6de5aedfe8ff0bc967b3690ae53d1f4205c10798;p=cs356-p2-videostore.git diff --git a/app/views/merchandise/list.rhtml b/app/views/merchandise/list.rhtml index a328f09..91e8f5e 100644 --- a/app/views/merchandise/list.rhtml +++ b/app/views/merchandise/list.rhtml @@ -1,22 +1,21 @@

Listing merchandises

- +
- - <% for column in Merchandise.content_columns %> - - <% end %> + + + + <% for merchandise in @merchandises %> - - <% for column in Merchandise.content_columns %> - - <% end %> - + + + + - + <% end %>
Merchandise ID<%= column.human_name %>Merchandise IDTitleQuantity RemainingPrice Per Unit
<%=h merchandise.id %><%=h merchandise.send(column.name) %><%= link_to 'Show', :action => 'show', :id => merchandise %><%=h merchandise.id %><%=link_to merchandise.title.to_s, :action => 'show', :id => merchandise %><%=h merchandise.quantity %><%=h number_to_currency(merchandise.price) %> <%= link_to 'Edit', :action => 'edit', :id => merchandise %><%= link_to 'Destroy', { :action => 'destroy', :id => merchandise }, :confirm => 'Are you sure?', :method => :post %><%= link_to 'Remove', { :action => 'destroy', :id => merchandise }, :confirm => 'Are you sure?', :method => :post %>