summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-10 14:24:06 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-10 14:24:06 +0200
commitf8cd616b1e7a4565c31579ab17951901902b4453 (patch)
tree065772c9c0f29580bfbff9788089a33b087f8de9 /registration.rb
parentb65549d1e2f7df62c9f941ed92b00759351e0c5f (diff)
downloadnorsk-urskog-registrations-f8cd616b1e7a4565c31579ab17951901902b4453.tar.gz
norsk-urskog-registrations-f8cd616b1e7a4565c31579ab17951901902b4453.tar.bz2
norsk-urskog-registrations-f8cd616b1e7a4565c31579ab17951901902b4453.zip
Rerender form instead of redirecting on error.
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/registration.rb b/registration.rb
index e8ddd6f..2888387 100644
--- a/registration.rb
+++ b/registration.rb
@@ -24,15 +24,13 @@ class RegistrationApp < Sinatra::Base
post '/submit' do
if request.form_data?
- #p request['band']
@band = Band.new(request['band'])
if @band.valid?
generate_pdf_for @band
send_registration_emails_for @band
erb :submitted
else
- session['errors'] = @band.errors
- redirect to('/')
+ erb :index
end
end
end