Displaying 1 result from an estimated 1 matches for "get_brands_for_category".
2006 Jan 13
3
related drop down list / ajax
...nds -%>
<option value=''<%= brand.id %>''><%= brand.title %></option>
<% end -%>
</select>
<%= observe_field("category",
:frequency => 0.25,
:update => "brand_id_container",
:url => { :action => :get_brands_for_category },
:with => "''category_id=''+value") %>
In my controller:
def get_brands_for_category
@brands = Brand.find_all_by_category_id(@params["category_id"])
end
Somehow it does not work. The related dropdown list does not change
contents. Does any...