Use _path rather than _url methods, and update form_for syntax for rails 3.