I recently switched to jQuery using jRails for an app. 99% of all my previous RJS seems to work perfectly, the only except is the :loading => callback when using the remote_form_tag.
<% form_remote_tag :url => '/hostels/update_currency', :loading => visual_effect(:appear, :load_currency), :html => { :id => 'currency' } do %>
I have a hidden DIV #load_currency which worked perfect before using the provided prototype helpers
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001648
But using the new jRails alternative, this feature doesn't seem to work?
I tried using RJS and jQuery directly:
:loading => visual_effect(:appear, :load_currency)
:loading => "$('#load_currency').show();"
which product this in the html:
onsubmit="jQuery.ajax({beforeSend:function(request){jQuery("#load_currency").fadeIn();}, data:jQuery.param(jQuery(this).serializeArray()) + '&authenticity_token=' + encodeURIComponent('O7Y7wzFoPPxGSTxIb2bQ3zshrUP+h1OGAUdtyzdQz0A='), dataType:'script', type:'post', url:'/hostels/update_currency'}); return false;">
I also tried the callbacks :before and :after instead of :loading and also got nothin... any ideas? Or does this feature just not work with jRails?
Thanks