Ruby on Rails Saturday, March 5, 2016

What I have is a list of audience types attending a training, and I
would like to split the list of checked items into two or three columns
instead of having one long list with checkboxes.

Here is my current code which works fine however it is presented in one
long list that you need to scroll down to see it all.

Is this even possible, and if it is, is it proper to do this having
mobile access in mind?

<tr>
<th>Audience:</th>
<td>
<ul>
<% @audiences.each do |audience| -%>
<li>
<%= check_box_tag('training[audience_ids][]', audience.id,
@training.audience_ids.include?(audience.id)) %>
<%= audience.name %>
</li>
<% end -%>
</ul>
</td>
</tr>

John

--
Posted via http://www.ruby-forum.com/.

--
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/12e8779e2b7f240f67020735554587fa%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment