Skip to content

Create and display pizzas #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lsimmons98
Copy link

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't commit changes like this for the actual code challenge. Pay attention to what you're committing EVERY TIME.

Copy link
Contributor

Choose a reason for hiding this comment

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

Code looks good, spacing could use some work. Adding a line between divs might be nice.

@@ -0,0 +1,4 @@
<h1><%="#{@pizza.name} from "%>
<%=link_to @pizza.pizzeria.name, pizzeria_path(@pizza.pizzeria)%>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<%=link_to @pizza.pizzeria.name, pizzeria_path(@pizza.pizzeria)%>
<%= link_to @pizza.pizzeria.name, pizzeria_path(@pizza.pizzeria) %>

<h1><%="#{@pizza.name} from "%>
<%=link_to @pizza.pizzeria.name, pizzeria_path(@pizza.pizzeria)%>
</h1>
<p>Description: <%[email protected]%>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>Description: <%=@pizza.description%>
<p>Description: <%= @pizza.description %>

@@ -1,2 +1,11 @@
<h1 style='margin-top:100px'>Pizzeria name: <%= @pizzeria.name %></h1>
<p>Address: <%= @pizzeria.address %></p>

<p><%= link_to "Tell us about a great pizza you had at #{@pizzeria.name}", new_pizzeria_pizza_path(@pizzeria)%></p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p><%= link_to "Tell us about a great pizza you had at #{@pizzeria.name}", new_pizzeria_pizza_path(@pizzeria)%></p>
<p><%= link_to "Tell us about a great pizza you had at #{@pizzeria.name}", new_pizzeria_pizza_path(@pizzeria) %></p>

<h2>Great eats from <%= @pizzeria.name %></h2>
<ol>
<% @pizzeria.pizzas.each do |pizza| %>
<li><%=link_to pizza.name, pizza_path(pizza) %></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<li><%=link_to pizza.name, pizza_path(pizza) %></li>
<li><%= link_to pizza.name, pizza_path(pizza) %></li>

Comment on lines +3 to +7
resources :pizzerias

resources :pizzerias do
resources :pizzas, only: [:new, :create, :show]
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops!

Suggested change
resources :pizzerias
resources :pizzerias do
resources :pizzas, only: [:new, :create, :show]
end
resources :pizzerias do
resources :pizzas, only: [:new, :create, :show]
end

Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't be deleting migrations. Assume that the migrations that were given to you are already "in production" and can't be undone.

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