Created
March 12, 2009 20:18
-
-
Save elliot-nelson/78264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- products/_form.rhtml --> | |
<% for category in Category.find(:all) %> | |
<div> | |
<%= check_box_tag "product[category_ids][]", category.id, @product.categories.include?(category), {:id => dom_id(category, dom_id(@product)) %> | |
<%= label_tag dom_id(category, dom_id(@product)), category.name %> | |
</div> | |
<% end %> | |
<!-- example label output: --> | |
<label for="product_7_category_3">Widget</label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment