Passing an Array as argument in a form_for

Hi There,

I've got a question regarding RoR. In a single RHTML page, I am showing some values (from an Array) and also I have a form_for.

I'd like to pass this Array to the form_for (thus, I could get the array in the controller).

The Array is filled from a previous method

def get_accounts     if       @list_accounts = Account.find(:all,:order => "date asc",:conditions => "date between '#{params[:initial_date]}' and '#{params[:final_date]}'")     end end

I've tried some approaches, such as:

<% form_for :accounts, :url => :action => :pay_accounts, :list_accounts => @list_accounts, do |form| %>

However, the hash map value for :list_accounts is not getting the list of accounts, but the LASTEST ID from the object inside the list_account.

Does anybody could help me?

Thanks in advice