diff app/views/pastes/_form.html.erb @ 2:42de15334db1

Added the pastes.
author Edho Arief <edho@myconan.net>
date Sun, 26 Aug 2012 11:28:23 -0700
parents
children faf30647205e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/pastes/_form.html.erb	Sun Aug 26 11:28:23 2012 -0700
@@ -0,0 +1,21 @@
+<%= form_for(@paste) do |f| %>
+  <% if @paste.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h2>
+
+      <ul>
+      <% @paste.errors.full_messages.each do |msg| %>
+        <li><%= msg %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :paste %><br />
+    <%= f.text_area :paste %>
+  </div>
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>