error.rb 665 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# frozen_string_literal: true

# Invite code handling
class SignupSite < Sinatra::Base
  get '/error' do
    @header                     = 'Oh no!'
    @body                       = session[:error_message]
    @form                       = erb :error
    @progress                   = session[:error_progress]
    session[:error_reload_form] = true
    erb :index
  end
13 14 15 16 17 18 19 20 21

  get '/warning' do
    @header                     = 'Look out!'
    @body                       = session[:error_message]
    @form                       = erb :warning
    @progress                   = session[:error_progress]
    session[:error_reload_form] = true
    erb :index
  end
22
end