Observe_form + Check_box = call action? I need help

What I am trying to do is create partial that will be invoked by

This partial is meant to have a list of categories and checkboxes next to each category. I want to set it up so when someone checks/unchecks a category, it does something like category.products < self

The models for both Category and Product have a hmabt relationship w/ each other.

The code I've got so far is:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000928