-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: master
Are you sure you want to change the base?
Conversation
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.
Please don't commit changes like this for the actual code challenge. Pay attention to what you're committing EVERY TIME.
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.
Code looks good, spacing could use some work. Adding a line between div
s might be nice.
@@ -0,0 +1,4 @@ | |||
<h1><%="#{@pizza.name} from "%> | |||
<%=link_to @pizza.pizzeria.name, pizzeria_path(@pizza.pizzeria)%> |
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.
<%=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]%> |
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.
<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> |
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.
<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> |
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.
<li><%=link_to pizza.name, pizza_path(pizza) %></li> | |
<li><%= link_to pizza.name, pizza_path(pizza) %></li> |
resources :pizzerias | ||
|
||
resources :pizzerias do | ||
resources :pizzas, only: [:new, :create, :show] | ||
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.
Whoops!
resources :pizzerias | |
resources :pizzerias do | |
resources :pizzas, only: [:new, :create, :show] | |
end | |
resources :pizzerias do | |
resources :pizzas, only: [:new, :create, :show] | |
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.
You shouldn't be deleting migrations. Assume that the migrations that were given to you are already "in production" and can't be undone.
No description provided.