Hi All,
I have an ‘admin’ controller in which I have a ‘show_product’ action. In
the view of this action, I have a list of names of the categories w/
checkboxes to the left of each.
What I am trying to do is to allow the administrator to just check off
the categories in this show_product view and have it add the product to
the category.
That part I am not able to figure out is how to display the list of
categories & checkboxes and create observe_form’s or observe_field’s to
send the product_id and category_id to the action that will do the logic
part.
Here is the code I’ve got:
@categories & @product is available to the show_product action as
variables
_categories.rhtml (partial gets called into the show_product.rhtml
<% if @categories %>
<% for category in @categories %>
<% else %>
No categories found.
<% end %>