I\'m trying to replace the content of a div after clicking on a link using Rails 3, remote_link :remote => true and jQuery.
So far, I\'ve been able to ge
Instead of using the global $.ajaxSettings.dataType = 'json'; setting a cleaner solution is to add a data-type attribute to the form element. The remote form event handlers will pass this through as the dataType to the jQuery AJAX call, e.g:
form_for @subject, :remote => true, :html => {'data-type' => 'json'}