jquery - ERB iteration not displaying div -
so i've created erb iteration iterates on number of products generates corresponding product image , div (.tagged) lays on top of image. problem when theres 1 out connection (i_connection) no div shown, when there more one, correct number of divs displays. idea what's going on here?
<% if @new_manual.present? %> <% @new_manual.steps.each |step| %> <% i_connection = contact.find(step.input_contact) %> <span class="connection" data-pos-x="<%= i_connection.pos_x %>" data-pos-y="<%= i_connection.pos_y %>" data-pos-width="<%= i_connection.pos_width %>" data-pos-height="<%= i_connection.pos_height %>"></span> <% o_connection = contact.find(step.output_contact) %> <% cord = cordtype.find(step.contact_item) %> <%= o_connection.product.full_name %> uses <%= cord.name %> plug <%= i_connection.product.full_name %><br> <%= image_tag(o_connection.image.image.url(:medium)) %> <br> <%= image_tag(cord.image.url(:thumb)) %><br> <br> <div id='image_panel'> <%= image_tag(i_connection.image.image.url(:medium)) %> <div id='planetmap'></div> </div> <%= image_tag(cord.image.url(:thumb)) %> <% end %> <% end %>
Comments
Post a Comment