从后台返回多条数据,然后动态创建checkbox每行显示三列,怎么显示
随便举个例子:code="ruby".each_with_index do |user, idx|<%= h user.name %><% if idx > 4 && (idx - 2) % 3 == 0 || idx == 2 %><% end %>end[/code]
循环数据,当index=3x+2时换行就可以了