Created
November 10, 2011 21:48
-
-
Save btucker/1356347 to your computer and use it in GitHub Desktop.
rails 2.3.x-esque remote_form_for in rails 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag action_path, :id => 'remote_form', :remote => true do %> | |
<%= submit_tag %> | |
<% end %> | |
<div id="result"></div> | |
<%= javascript_tag do %> | |
jQuery(function($) { | |
$("#remote_form").bind("ajax:success", function(ev, data) { | |
$("#result").html(data); | |
}); | |
}); | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment