# Use table instead of selectbox

**URL:** <https://www.ruby-forum.com/t/use-table-instead-of-selectbox/111658>\
**Category:** Rails\
**Created:** [August 9, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/use-table-instead-of-selectbox/111658 "2007-08-09T16:14:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![budu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b5e925/32.png) [@budu](https://www.ruby-forum.com/u/budu)\
**Post date:** [August 9, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/use-table-instead-of-selectbox/111658/1 "2007-08-09T16:14:24Z")

</div>

Hi @all  
i hope someone can help me with my problem or give me a hint;-)

okay let’s start :

I have a “has and belongs to many”-association.  
I dont want to use a select box to show and edit the associations  
(\<%= select\_tag “sel[]”,  
options\_from\_collection\_for\_select(Hallen.find\_all, :ID, :name,  
@gewinnspiel.hallen.collect {|t| t.id}), :multiple =\> true %\>)

i want to use a table with checkboxes but where can i realise it?  
list and show if something is associated or selected is no problem…

\<% for row in @spielhallen %\> \<% end %\>

| ID |
| \<% if not @gewinnspiel.hallen(row.ID).nil? %\> \<%= image\_tag("remove.gif", :border =\> 0) %\> \<% end %\> |

greets Nico
