Add 'RubyFun/' from commit 'b01c6826131196ba58b5288a3182f2526c89c249'

git-subtree-dir: RubyFun
git-subtree-mainline: a04a502787
git-subtree-split: b01c682613
This commit is contained in:
Dan Buch
2013-01-09 23:50:14 -05:00
299 changed files with 25309 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
<%= form_tag :action => 'new' do %>
Item: <%= text_field "item", "value" %>&#x00A;
<%= submit_tag "Add new item" %>
<% end %>

View File

@@ -0,0 +1,5 @@
<ul style="font-family:monospace;">
<% @list.each_with_index do |item, i| %>
<%= create_li(item, i).html_safe %>
<% end %>
</ul>

View File

@@ -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' %>