search for: rails_gen_token

Displaying 1 result from an estimated 1 matches for "rails_gen_token".

2008 May 07
2
Inserting authenticity token into AJAX request params
...Ajax.Responders.register({ onLoading: function(req){ if ((req.options.method == ''post'') && ! Object.keys(req.options.parameters).include(''authenticity_token'')){ ----> req.options.parameters.set(''authenticity_token'', rails_gen_token()); } alert(''method is: '' + req.options.method + ''\nparams are: '' + Object.keys(req.options.parameters)); }, onComplete: function(){ alert(''a request completed''); } }); Where you see the arrow is where my problem...