Add 'RubyFun/' from commit 'b01c6826131196ba58b5288a3182f2526c89c249'
git-subtree-dir: RubyFun git-subtree-mainline:a04a502787
git-subtree-split:b01c682613
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<%= form_tag :action => 'new' do %>
|
||||
Item: <%= text_field "item", "value" %>

|
||||
<%= submit_tag "Add new item" %>
|
||||
<% end %>
|
@@ -0,0 +1,5 @@
|
||||
<ul style="font-family:monospace;">
|
||||
<% @list.each_with_index do |item, i| %>
|
||||
<%= create_li(item, i).html_safe %>
|
||||
<% end %>
|
||||
</ul>
|
@@ -0,0 +1,11 @@
|
||||
<h2>My shopping list</h2>
|
||||
|
||||
<ul>
|
||||
<% @list.each do |item| %>
|
||||
<li><%= item.name %>
|
||||
<%= link_to 'Delete', {:action => 'delete', :id => item.id} %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render :partial => 'new_item_form' %>
|
Reference in New Issue
Block a user