From 70f89f14364ba47db737b747d5a7635d016e8ab1 Mon Sep 17 00:00:00 2001 From: bkrigel Date: Tue, 3 Jul 2018 11:58:37 -0400 Subject: [PATCH] Tha Beasts rule once again --- app.rb | 14 ++++++++++++++ views/newteam.erb | 10 ++++++++++ views/team.erb | 10 +++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/app.rb b/app.rb index 2bd6170..209166e 100644 --- a/app.rb +++ b/app.rb @@ -2,5 +2,19 @@ class App < Sinatra::Base + get '/newteam' do + erb :newteam + end + + post '/team' do + @team_name = params[:name] + @coach = params[:coach] + @point_guard = params[:pg] + @shooting_guard = params[:sg] + @small_forward = params[:sf] + @power_forward = params[:pf] + @center = params[:c] + erb :team + end end diff --git a/views/newteam.erb b/views/newteam.erb index 2eb4207..7cc165e 100644 --- a/views/newteam.erb +++ b/views/newteam.erb @@ -5,6 +5,16 @@ Basketball Team Signup +
+

Team Name:

+

Coach:

+

Point Guard:

+

Shooting Guard:

+

Small Forward:

+

Power Forward:

+

Center:

+ +
diff --git a/views/team.erb b/views/team.erb index 1402747..c18837d 100644 --- a/views/team.erb +++ b/views/team.erb @@ -5,9 +5,13 @@ Basketball Team - - - +

Team Name: <%= @team_name %>

+

Coach: <%= @coach %>

+

Point Guard: <%= @point_guard %>

+

Shooting Guard: <%= @shooting_guard %>

+

Small Forward: <%= @small_forward %>

+

Power Forward: <%= @power_forward %>

+

Center: <%= @center %>