Skip to content

Conversation

ASPhillips8
Copy link

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
Screenshot 2024-08-08 at 11 12 26 AM
Screenshot 2024-08-08 at 11 12 16 AM

Comment on lines 5 to 13
get '/newteam' do
erb :newteam
end


post '/team' do
@teamData = params
erb :team
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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...

Suggested change
@teamData = params
@team_data = params

views/team.erb Outdated
</head>
<body>

<h1>Team Name: <%=@teamData["name"] %> </h1>

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 =.

Suggested change
<h1>Team Name: <%=@teamData["name"] %> </h1>
<h1>Team Name: <%= @teamData["name"] %> </h1>

views/team.erb Outdated
<body>

<h1>Team Name: <%=@teamData["name"] %> </h1>
<h2>Coach: <%=@teamData["coach"]%>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h2>Coach: <%=@teamData["coach"]%>
<h2>Coach: <%= @teamData["coach"] %>

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants