Skip to content

Built Form With ERB#16

Open
ASPhillips8 wants to merge 5 commits intolearn-co-students:masterfrom
ASPhillips8:working-branch-asp
Open

Built Form With ERB#16
ASPhillips8 wants to merge 5 commits intolearn-co-students:masterfrom
ASPhillips8:working-branch-asp

Conversation

@ASPhillips8
Copy link
Copy Markdown

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 thread app.rb
Comment on lines +5 to +13
get '/newteam' do
erb :newteam
end


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

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

Comment thread app.rb Outdated


post '/team' do
@teamData = params
Copy link
Copy Markdown

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

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

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

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>

Comment thread views/team.erb Outdated
<body>

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

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
Copy Markdown
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