annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
1 <%= form_for(@paste) do |f| %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
2 <% if @paste.errors.any? %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
3 <div id="error_explanation">
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
4 <h2><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h2>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
5
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
6 <ul>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
7 <% @paste.errors.full_messages.each do |msg| %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
8 <li><%= msg %></li>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
9 <% end %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
10 </ul>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
11 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 <% end %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
13
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
14 <div class="field">
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
15 <%= f.label :paste %><br />
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
16 <%= f.text_area :paste %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
17 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
18 <div class="actions">
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
19 <%= f.submit %>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
20 </div>
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
21 <% end %>