How about putting a serialized version of it as an attachment using a 
multipart-form? As long as you're using a POST in your form action there 
shouldn't be any set limit on the size of data that you're posting.

@problems.to_yaml (or @problems.to_json) should give you a textual 
format. Then in the receiving action de-serialize the yaml (or json).

Joe Peck wrote:
> Good morning everybody, how are you?
> 
> Okay, this should be easy.  I am generating a large array in one action,
> and I want to pass this array to another action when the user pushes a
> button.
> 
> @problems is a large array (about 2,000 items) that I need to pass to
> the action "buy_cards".  What is the best way to do this?  I'm pretty
> sure it's too big for a session, and I don't want to store it in DB,
> since I just need it temporarily:
> 
> <%= button_to "Buy Cars", :action => :buy_cars, :car_id => @file_id,
> :problems => @problems %>
> 
> Anyone know a good way to pass a large array from one action to another?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to