NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

Data for AJAX req in Rails on the fly – solution

Posted on September 30, 2006 - Filed Under AJAX, Ruby

There is solution with Rails helper to issue from my last post. Simple use :with to pass JavaScript variable name.

remote_function (:update => 'results',
:url => {:action => search_points}, :with => 'dataForSearch')

gives exactly what is needed:

new Ajax.Updater('results', '/route/search_points',
{asynchronous:true, evalScripts:true, parameters:dataForSearch});

Popularity: 3% [?]

Hits for this post: 3819

Similar Posts

Comments

Leave a Reply