Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

AS's Profile

GitHub User: VPLDev

Comments by AS

Avatar

Hey guys,
When I remotely load the new form and click on submit button; the javascript is simply ignored and the form is submitted to the controller. This leads to "Invalid token" error as no token was generated. But if I don't load the form via remotely, everything works fine. Any idea what am I doing wrong?

This is how I render the new form:

ruby
$('#show-content').html("<%= escape_javascript(render :partial => 'create_form') %>");
Avatar

How would you change/add to this script, if you wanted to get the respective cities of each state?