Re: [Rails] Passing arrays between controllers/views

2011-09-10 Thread Colin Law
On 10 September 2011 00:41, Toby Rodwell li...@ruby-forum.com wrote:
 I have a controller that produces (through its associated 'view'
 displays summary information of) a number of arrays.  On that view page
 I would like links to other pages, one per array, which shows more
 detailed information on the array in question.  I tried passing the
 array as a parameter to a link and whilst I think that would have been
 fine for small arrays for a large array I was getting URI too large.
 Since I don't have admin rights to the web server I don't think I can
 tweak the http buffer settings, and anyway I don't think very long URLs
 are elegant.  What other ways are there to achieve what I am after?  One
 suggstion I saw was using a session - is that the best way (the Ruby
 way) to pass data between controllers?  Any suggstions gratefully
 received.

If possible then do not pass the array to the url, just pass whatever
information is required to re-generate the array in the subsequent
action.

-- 
Colin
https://plus.google.com/111605230843729345543/

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Passing arrays between controllers/views

2011-09-09 Thread Toby Rodwell
I have a controller that produces (through its associated 'view'
displays summary information of) a number of arrays.  On that view page
I would like links to other pages, one per array, which shows more
detailed information on the array in question.  I tried passing the
array as a parameter to a link and whilst I think that would have been
fine for small arrays for a large array I was getting URI too large.
Since I don't have admin rights to the web server I don't think I can
tweak the http buffer settings, and anyway I don't think very long URLs
are elegant.  What other ways are there to achieve what I am after?  One
suggstion I saw was using a session - is that the best way (the Ruby
way) to pass data between controllers?  Any suggstions gratefully
received.

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Passing arrays between controllers/views

2011-09-09 Thread Michael Pavling
On 10 September 2011 00:41, Toby Rodwell li...@ruby-forum.com wrote:
 What other ways are there to achieve what I am after?  One
 suggstion I saw was using a session - is that the best way (the Ruby
 way) to pass data between controllers?  Any suggstions gratefully
 received.

If your data is as large as you say, and if you're using cookies for
the session store, you'll probably run out of space in there too.
So your best bet would be some form of database persistence. Either
set the sessions to the DB, or have a QueryString object associated
to each user (that could allow you to persist their arrays of data across
sessions if you wanted to...)

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.