diff options
-rw-r--r-- | views/layout.erb | 6 |
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> |