diff options
Diffstat (limited to 'registration.rb')
-rw-r--r-- | registration.rb | 6 |
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 |