If you read the resulting JavaScript you'll see that the parameter in the select simple isn't there. And why would it be? How should it know? You'll get it working using the :with
key in the options to observe_field
.
<%=
observe_field(
:product_category,
:url => {
:controller => 'products',
:action => 'get_subcategories'
},
:with => 'id',
:update => "subcategory_div"
)
%>