comparison app/views/pastes/_form.html.erb @ 265:6cca1ab53337

Infinitely better error messages and notice.
author edogawaconan <me@myconan.net>
date Wed, 16 Oct 2013 02:56:30 +0900
parents c4aba8990c5e
children dff632a63ada
comparison
equal deleted inserted replaced
264:fa4a1ba990ae 265:6cca1ab53337
1 <%= form_for @paste do |f| %> 1 <%= form_for @paste do |f| %>
2 <% if @paste.errors.any? %>
3 <div class="alert alert-error" id="error_explanation">
4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5>
5
6 <ul>
7 <% @paste.errors.full_messages.each do |msg| %>
8 <li><%= msg %></li>
9 <% end %>
10 </ul>
11 </div>
12 <% end %>
13
14 <div class="form-group"> 2 <div class="form-group">
15 <%= f.text_area :paste, :rows => 10, :class => "form-control" %> 3 <%= f.text_area :paste, :rows => 10, :class => "form-control" %>
16 </div> 4 </div>
17 5
18 <div class="form-group"> 6 <div class="form-group">