Reputation: 330
I have looked at cycle() but it has problem formatting when i do:
<%= cycle('<div title="Pages">', <div>) %>
I have done this:
<div id="mybook">
<% @print.document_images_list.each do |image| %>
<%= cycle('<div title="Pages">', '<div>') %>
<%= image_tag image %>
</div>
<% end %>
</div>
<% end %>
and the HTML output shows something like:
<div title="Pages">
and
<div>
I have looked at .each_slice enumerator and (1..x).each but i am not sure how to do about this.
(I need it without "title" in div as well)
Upvotes: 1
Views: 77
Reputation: 7304
Try
<%= raw cycle('<div title="Pages">', '<div>') %>
or
<%= cycle('<div title="Pages">', '<div>').html_safe %>
Upvotes: 1