Finished Chapter 12
[depot.git] / app / views / info / who_bought.html.erb
diff --git a/app/views/info/who_bought.html.erb b/app/views/info/who_bought.html.erb
new file mode 100644 (file)
index 0000000..e38b4a2
--- /dev/null
@@ -0,0 +1,9 @@
+<h3>People Who Bought <%= @product.title %></h3>
+
+<ul>
+  <% for order in @orders -%>
+    <li>
+      <%= mail_to order.email, order.name %>
+    </li>
+  <% end -%>
+</ul>
\ No newline at end of file