Skip to content

Instantly share code, notes, and snippets.

@nicoolas25
Created October 31, 2013 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoolas25/7248668 to your computer and use it in GitHub Desktop.
Save nicoolas25/7248668 to your computer and use it in GitHub Desktop.
Use Rails's Javascript remote calls on div.
(function($){
$(document).on('rails:attachBindings', function(){
$.rails.buttonClickSelector = $.rails.buttonClickSelector + ', div[data-remote]';
return true;
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment