summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/registration.rb b/registration.rb
index 8501a37..e85fc47 100644
--- a/registration.rb
+++ b/registration.rb
@@ -13,17 +13,8 @@ class RegistrationApp < Sinatra::Base
config_file File.join(settings.root, 'config.yml')
-
- helpers do
- def accept_registrations
- start_date = Date.parse(settings.accept_registrations[:start])
- end_date = Date.parse(settings.accept_registrations[:stop])
- start_date <= Date.today && end_date > Date.today
- end
- end
-
get '/' do
- if !accept_registrations
+ if !accept_registrations(settings)
return erb :registration_closed
end