Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

nudler's Profile

GitHub User: nudler

Comments by


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()