Mercurial > zeropaste
comparison app/views/pastes/_form.html.erb @ 56:8ef70e8c239d
Bootstrap-styled error message.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 04 Oct 2012 05:04:30 +0700 |
parents | a930c717654c |
children | b4b7a29b70f6 |
comparison
equal
deleted
inserted
replaced
55:f957ce997ff0 | 56:8ef70e8c239d |
---|---|
1 <%= form_for(@paste) do |f| %> | 1 <%= form_for(@paste) do |f| %> |
2 <% if @paste.errors.any? %> | 2 <% if @paste.errors.any? %> |
3 <div id="error_explanation"> | 3 <div class="alert alert-error" id="error_explanation"> |
4 <h2><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h2> | 4 <h5><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h5> |
5 | 5 |
6 <ul> | 6 <ul> |
7 <% @paste.errors.full_messages.each do |msg| %> | 7 <% @paste.errors.full_messages.each do |msg| %> |
8 <li><%= msg %></li> | 8 <li><%= msg %></li> |
9 <% end %> | 9 <% end %> |