Created
February 18, 2012 04:01
-
-
Save scottwb/1857315 to your computer and use it in GitHub Desktop.
Patch rails.js from rails/jquery-ujs to make it honor jQuery Mobile data-ajax
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
diff --git a/src/rails.js b/src/rails.js | |
index 06b4e0b..49ff0b2 100644 | |
--- a/src/rails.js | |
+++ b/src/rails.js | |
@@ -174,6 +174,11 @@ | |
if (target) { form.attr('target', target); } | |
+ var ajax = link.data('ajax'); | |
+ if (ajax !== undefined) { | |
+ form.attr('data-ajax', ajax); | |
+ } | |
+ | |
form.hide().append(metadata_input).appendTo('body'); | |
form.submit(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment