summaryrefslogtreecommitdiffstats
path: root/registration.rb
blob: e5be8f03d0ac1cddf969009171f1a86f2b2287e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'sinatra/base'
require_relative 'lib/registration'

class RegistrationApp < Sinatra::Base

  get '/' do
    erb :index
  end

  post '/submit' do
    if request.form_data?
      #p request['band']
      @band = Band.new(request['band'])
      generate_pdf_for @band
      send_registration_emails_for @band
      erb :submitted
    end
  end

  run! if app_file == $0
end