Below is my loop I am running in a rails helper method.
part_child_option.each do |o|
html += "<div class='col-sm-2 uno_part_wrapper'>"
html += "<label class = 'p_name' for='#{attr_name}'>"
html += image_tag o.photo(:small), class: "tick_option_img",
html += "</label>"
html += "</div>"
end
html.html_safe
end
I have a problem now. class col-sm-2
is there, so It is under a class row
in my view. The row is outside of my helper and hence I am not able to loop it.
The pointed solution doesn't have such scenario
Now I want my row
class to close once the col-sm-2
is done with six times. And then I want to start the class row
again and everything same as above in my class row.
I hope the question is clear now.
How can this be done.