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

Queues Laura's api-muncher #66

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Worked a bit on views
lmelgarejos committed May 9, 2017
commit df007b6004c800bbc074834f4a1c5fb6100e8bf8
29 changes: 24 additions & 5 deletions app/views/recipes/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
<h1>The recipe</h1>
<% @recipe.each do |info| %>

<% @recipe.each do |info| %>
<%= link_to info.label, info.url %>
<div>
<h2>For the recipe for <%= link_to info.label, info.url %> you will need:</h2>

<div>
<ul>
<% info.ingredients.each do |i| %>
<ul>
<li><%= i['text'] %></li>
</ul>
<% end %>
</ul>
</div>
<div>
<%= link_to image_tag(info.image), info.url %>
</div>
<% end %>
<div>
<h4>Diet information:</h4>
<h6>This recipe has: <%= info.calories.round(2) %> calories, aslo it is:
<% info.dietLabels.each do |i| %>
<%= i %>.
<% end %>
<% info.healthLabels.each do |i| %>
<%= i %>.
<% end %></h6>
</div>
<% end %>
4 changes: 1 addition & 3 deletions test/controllers/recipes_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require "test_helper"

describe RecipesController do
# it "must be a real test" do
# flunk "Need real tests"
# end

end