Sign in through GitHub

Jason Garber's Profile

GitHub User: jgarber

Site: http://twitter.com/jasongarber

Comments by Jason Garber

Avatar

One bug to watch out for is selecting a country and state, saving, and then changing it to a country that has no states. The old state will still persist on the object because the state select was emptied, so no value will be POSTed/PUT for state. You can either do .html($("<option>").attr('selected',true)) instead of empty() or you can have a hidden field with the same name, like Rails does for checkboxes.