summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/registration.rb b/registration.rb
index f7a31b0..da11e4e 100644
--- a/registration.rb
+++ b/registration.rb
@@ -14,9 +14,7 @@ class RegistrationApp < Sinatra::Base
config_file File.join(settings.root, 'config.yml')
before do
- if !accept_registrations(settings)
- halt erb :registration_closed
- end
+ redirect to('/registrations_closed') unless accept_registrations(settings)
end
get '/' do
@@ -25,6 +23,10 @@ class RegistrationApp < Sinatra::Base
erb :index
end
+ get '/registrations_closed' do
+ erb :registration_closed
+ end
+
post '/submit' do
if request.form_data?
@band = Band.new(request['band'])