parent
7329bcdeb4
commit
36c69e95a4
@ -1,2 +1,16 @@
|
|||||||
<h1>List#shopping_list</h1>
|
<h2>My shopping list</h2>
|
||||||
<p>Find me in app/views/list/shopping_list.html.erb</p>
|
|
||||||
|
<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 %>
|
||||||
|
Loading…
Reference in new issue