Form_remote, getting data from submit

Hi list,

I’m writing a little survey application, and surveys are generated
dynamically. I use form_remote_tag and AJAX to submit the form to a
method ‘submit’ in my ‘survey’ controller.

The view generates the form as:

Question 1? Question 2? etc...

How can I access the array/object ‘resultset’ in my submit action in
the survey controller? I’ve tried using @resultset in the ‘submit’
view or params[:resultset] in the ‘submit’ action, both seem to be
nil.

Hope someone can help me.

Thanks in advance!

params[:resultset] is what you want. Try using params[:resultset]
[‘1’] instead of params[:resultset][1]. (notice the number 1 in quotes)

~ ryan ~

2005/12/29, Michiel S. [email protected]:

Hope someone can help me.

Thanks in advance!

Ah, I think I know what the problem is. I should have some resultset
defined in the ‘show’ method for the view first.

But text_field etc. work with @object.method, and not with for example
@array[id]. Is there any way of doing the latter thing?

TIA