Ruby on Rails Thursday, April 12, 2018



On Wednesday, April 11, 2018 at 7:10:53 PM UTC+8, dasibre wrote:
How are you looping through the result. When you say you are unable to loop through, what do you mean exactly, what error are you getting


Hi thanks for the reply. Ive been trying to loop through like so

<% @output['products'].each do |out| %>
<p><% @output['name'] %></p>
<P><% image_tag @output['images'].first %>  </p>
<% link_to 'Show', product[:id]_show_path %> 
<% end %>

ive been using this as a basic template.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/60062487-0b2c-4c40-9e5c-fbde50017df0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment