summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-06 21:12:06 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-06 21:12:06 +0200
commit8c041f820af424978f92f8ba0e68e64d6caf0c5b (patch)
treecfa0783054bd820542eefcf080fbe9cea4fa9e4d
parentde0fec30785a2ddf22f90af805ba4790d77562fa (diff)
downloadnorsk-urskog-registrations-8c041f820af424978f92f8ba0e68e64d6caf0c5b.tar.gz
norsk-urskog-registrations-8c041f820af424978f92f8ba0e68e64d6caf0c5b.tar.bz2
norsk-urskog-registrations-8c041f820af424978f92f8ba0e68e64d6caf0c5b.zip
In layout, display errors directly from @band.errors
-rw-r--r--views/layout.erb6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/layout.erb b/views/layout.erb
index efda293..5f67f1e 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -8,13 +8,13 @@
<title>Norsk Urskog 2015 - Påmeldingsskjema for band</title>
</head>
<body>
- <% if @errors %>
+ <% if @band && @band.errors %>
<div class="error">
<h1 class="error-heading">Det er feil i skjemaet!</h1>
<p>Vennligst se over følgende og prøv igjen:</p>
<ul>
- <% @errors.each do |err| %>
- <li><%=h err %></li>
+ <% @band.errors.each do |err| %>
+ <li><%= err %></li>
<% end %>
</ul>
</div>