Results 1 to 6 of 6
Thread: check_box selection
Jul 5, 2006, 12:54 #1
- Join Date
- May 2001
- 0 Post(s)
- 0 Thread(s)
I'm using the check_box form helper and trying to do the following:
I have an array @collections I want to provide checkboxes for.
And I also have an @articles object that contains a "collections" method.
I want to have collections that an article belongs to selected.
I've been trying different variations of this to no avail:
from my controller
@article = Article.new
@collections = Collection.find(:all)
<% for collection in @collections %>
<tr><td align="right"><%= check_box 'collection', 'id' %></td><td><%= collection.name %></td></tr>
<% end %>