M
Matt Koidin
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 %>
<dd><%= check_box "category", category.id %><%= category.name %></dd>
<dt> </dt>
<% 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
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 %>
<dd><%= check_box "category", category.id %><%= category.name %></dd>
<dt> </dt>
<% 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