-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built Form With ERB #16
base: master
Are you sure you want to change the base?
Built Form With ERB #16
Conversation
app.rb
Outdated
get '/newteam' do | ||
erb :newteam | ||
end | ||
|
||
|
||
post '/team' do | ||
@teamData = params | ||
erb :team | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get '/newteam' do | |
erb :newteam | |
end | |
post '/team' do | |
@teamData = params | |
erb :team | |
end | |
get '/newteam' do | |
erb :newteam | |
end | |
post '/team' do | |
@teamData = params | |
erb :team | |
end |
app.rb
Outdated
|
||
|
||
post '/team' do | ||
@teamData = params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not in Kansas anymore...
@teamData = params | |
@team_data = params |
views/team.erb
Outdated
@@ -5,7 +5,14 @@ | |||
<title>Basketball Team</title> | |||
</head> | |||
<body> | |||
|
|||
<h1>Team Name: <%=@teamData["name"] %> </h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These all should have spaces after the =.
<h1>Team Name: <%=@teamData["name"] %> </h1> | |
<h1>Team Name: <%= @teamData["name"] %> </h1> |
views/team.erb
Outdated
@@ -5,7 +5,14 @@ | |||
<title>Basketball Team</title> | |||
</head> | |||
<body> | |||
|
|||
<h1>Team Name: <%=@teamData["name"] %> </h1> | |||
<h2>Coach: <%=@teamData["coach"]%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<h2>Coach: <%=@teamData["coach"]%> | |
<h2>Coach: <%= @teamData["coach"] %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just went in and made those suggested changes
Updated shotgun version and rspec for tests. Defined get route for newteam. Created form with erb. Updated post route in App to handle form submit. Displayed submitted form data with erb