radiobox collection


/ Published in: Rails
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <% Company.find(:all).each do |c| %>
  2. <input type="radio" name="technology[company_id]" value="<%= c.id -%>"
  3. <% if @technology.company == c -%> checked="checked" <% end -%> />
  4. <%= c.name %></td>
  5. <% end %>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.