From 335773f4c7f9b3c1c11a490e933e7d64099d85a9 Mon Sep 17 00:00:00 2001 From: Darren DCosta Date: Thu, 2 May 2019 10:59:59 -0400 Subject: [PATCH] Done. --- app.rb | 14 ++++++++++++++ views/newteam.erb | 13 +++++++++++-- views/team.erb | 13 ++++++++----- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/app.rb b/app.rb index 2bd6170..7e4298a 100644 --- a/app.rb +++ b/app.rb @@ -1,6 +1,20 @@ + require 'sinatra/base' class App < Sinatra::Base + get '/newteam' do + erb :newteam + end + post '/team' do + @name = params[:name] + @coach = params[:coach] + @pg = params[:pg] + @sg = params[:sg] + @pf = params[:pf] + @sf = params[:sf] + @c = params[:c] + erb :team + end end diff --git a/views/newteam.erb b/views/newteam.erb index 2eb4207..f75ca36 100644 --- a/views/newteam.erb +++ b/views/newteam.erb @@ -5,7 +5,16 @@ Basketball Team Signup +
+

Create a Basketball Team!

+

Team Name:

+

Coach:

+

Point Guard:

+

Shooting Guard:

+

Small Forward:

+

Power Forward:

+

Center:

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

Basketball Team!

+ Team Name: <%= @name %> + Coach: <%= @coach %> + Point Guard: <%=@pg %> + Power Forward: <%=@pf %> + Shooting Guard: <%=@sg %> + Small Forward: <%=@sf %> + Center: <%=@c %> - -