summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-03 17:41:27 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-03 17:47:28 +0200
commit1c48f48073e33875650b687ced05a51e0fd7f7d3 (patch)
tree0426fff05d78335a81c7c2d369e00d29bfbc0028 /registration.rb
parentff7a2f930d58e0cb02ffee76e250a02e6b3c7ce3 (diff)
downloadnorsk-urskog-registrations-1c48f48073e33875650b687ced05a51e0fd7f7d3.tar.gz
norsk-urskog-registrations-1c48f48073e33875650b687ced05a51e0fd7f7d3.tar.bz2
norsk-urskog-registrations-1c48f48073e33875650b687ced05a51e0fd7f7d3.zip
Add route to handle submitted form.
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/registration.rb b/registration.rb
index de9ec75..9fae54f 100644
--- a/registration.rb
+++ b/registration.rb
@@ -1,4 +1,5 @@
require 'sinatra/base'
+require_relative 'lib/band'
class RegistrationApp < Sinatra::Base
@@ -6,5 +7,14 @@ class RegistrationApp < Sinatra::Base
erb :index
end
+ post '/submit' do
+ if request.form_data?
+ #p request['band']
+ @band = Band.new(request['band'])
+
+ erb :submitted
+ end
+ end
+
run! if app_file == $0
end