AJAX helpers and script.aculo.us 'parameters:' option

Hi!
I needed to pass through XHR data generated earlier in JavaScript (so it
is not known on rhtml template level), but I could not accomplish this
wiht Rails helpers. Is there some way to populate ‘parameters:’ option
of Ajax.Updater through helpers like remote_function?

Or maybe there is other solution than mine (direct use of Ajax.Updater
)?

My workaround described here:
http://nhw.pl/wp/2006/09/30/generating-data-for-ajax-req-in-rails-on-the-fly/


Witold R.
http://nhw.pl

Yes there is, try the :with parameter. It’s documented (somewhat) here:
http://rubyonrails.org/api/classes/ActionView/Helpers/PrototypeHelper.html
(see AJAX_OPTIONS)

:url => { … }, :with => “‘param=’ + javascript_variable”

Vish