Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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

app.rb Outdated
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
@@ -5,7 +5,14 @@
<title>Basketball Team</title>
</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
@@ -5,7 +5,14 @@
<title>Basketball Team</title>
</head>
<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