RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: nudler
I had a problem. When I changed the "country" dropdown sometimes it selected the wrong values for the "province" dropdown. Solved it like this:
country = $('#cat_category_id :selected').text() province = $(countrydropdown).filter("optgroup[label='#{country}']").html()
I had a problem. When I changed the "country" dropdown sometimes it selected the wrong values for the "province" dropdown. Solved it like this: