summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2016-08-16 22:19:39 +0200
committerHarald Eilertsen <haraldei@anduin.net>2016-08-16 22:21:49 +0200
commit9594f5be7daa673b88654e0f47db07d1c1454765 (patch)
tree29785fb57273a5c98c75e592e0078c751a376382 /registration.rb
parent62326cb57470475fd10e83e28d56a92e6cbc07bf (diff)
downloadnorsk-urskog-registrations-9594f5be7daa673b88654e0f47db07d1c1454765.tar.gz
norsk-urskog-registrations-9594f5be7daa673b88654e0f47db07d1c1454765.tar.bz2
norsk-urskog-registrations-9594f5be7daa673b88654e0f47db07d1c1454765.zip
Move registration open check to before filter.
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/registration.rb b/registration.rb
index e85fc47..f7a31b0 100644
--- a/registration.rb
+++ b/registration.rb
@@ -13,11 +13,13 @@ class RegistrationApp < Sinatra::Base
config_file File.join(settings.root, 'config.yml')
- get '/' do
+ before do
if !accept_registrations(settings)
- return erb :registration_closed
+ halt erb :registration_closed
end
+ end
+ get '/' do
@band = Band.new
3.times { @band.songs << Song.new }
erb :index