From: Matt Koidin Date: 2005-06-18T01:50:33+09:00 Subject: Simple Check Box Question I'm new to ruby and rails and I have a simple question that is driving me crazy. I have a group of check boxes and I want to be able to default check some of them based on entries in a database. My display.rhtml looks like this: <% for category in @categories %>
<%= check_box "category", category.id %><%= category.name %>
 
<% end %> If I was writing in HTML I would add a CHECKED option to the checkbox tag to have it default to checked. How do I do that with ruby? Thanks, Matt