Store Search[:orientations] in the database in "text".
In the search form:
<% form_for @search do |f| %>
<%= f.check_box orientations[], {}, 0, nil %>Straight
<%= f.check_box orientations[], {}, 1, nil %>Gay
<%= f.check_box orientations[], {}, 2, nil %>Bisexual
Then in the Search model:
serialize :orientations
See http://railsforum.com/viewtopic.php?id=15176
Will this work? I have not implemented this but I would like to know
if this is the right direction. I already see one problem: How does
the search form remember the checkboxes that the user has checked?
Unlike the radio_button helper where if the current value of method is
tag_value the radio button will be checked, I don't see where
check_box examines the current value of orientations[] from the
database.
Thanks.