/ Published in: Rails

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<% Company.find(:all).each do |c| %> <input type="checkbox" name="technology[company_ids][]" value="<%= c.id %>" <% if @technology.companies.include?(c) -%> checked="checked" <% end -%> /> <%= c.name %></td> <% end %>
Comments
