You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
370 B
17 lines
370 B
<h2>My shopping list</h2>
|
|
|
|
<ul>
|
|
<% @list.each do |item| %>
|
|
<li><%= item.name %>
|
|
<%= link_to 'Delete', {:action => 'delete', :id => item.id} %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<h2>Add new item</h2>
|
|
|
|
<%= form_tag :action => 'new' do %>
|
|
<label for="product_name">Item:</label><%= text_field "product", "name" %>

|
|
<%= submit_tag "Add new item" %>
|
|
<% end %>
|