Hi, I have a form which generates statistics: form.rhtml --> /my_big_app/stats/generate --> view_results.rhtml My method 'generate' generates an array of statistics @results = [hash_1,hash_2,etc.] and I want to display graphics with gruff in my view_results.rhtml page: @results.each do |result| generate_graphic(result) end My helper generate_graphic simply renders <img src='/my_big/app/graph_controller/generate_image/'> (I can't use image_tag since it automatically adds now a .png). So how can I easily pass my hashes to my graph_controller? I want to have a params[:stats] = my_hash for the generate_image method but I need to flatten the hash which is ugly with a whole bunch of data. Do you have any idea? -- ,========================. | Pierre-Alexandre Meyer | | email : firstname.lastname@example.org | `========================'
on 2007-03-17 14:26
on 2007-03-17 14:38
Pierre-Alexandre Meyer wrote: > @results.each do |result| > > Do you have any idea? Store it directly in the session object or store it somewhere else and point to it with the session id? -- Michael Wang
on 2007-03-17 17:05
On Sat, Mar 17, 2007 at 06:38:13AM -0700, Michael Wang wrote : > Store it directly in the session object or store it somewhere else and > point to it with the session id? Actually, it's what I'm currently doing but I'm not persuaded it's the proper.superlative (propest? sounds weird) way to do this, since it's a lot of information which is periodically updated. -- ,========================. | Pierre-Alexandre Meyer | | email : email@example.com | `========================'