Hi!
I have a search form that calls search action, which executes paginate
method with many conditions using data from the form.
Now if all results don''t fit into a single page, do i have to send all
conditions again to paginate method in link_to previous/next?
If yes, how? All my parameters from the search form are inside a
(nested) hash called ''form'' so i tried to do something like
this:
@form = params[:form]
and later in the view pass it in
link_to ''next'', {:page => ..., :form => @form}
but i get all parameters in the url one after another
(var1value1var2value2) and not like this: ?var1=value1&var2=value2.
Another thing: if i get a hash from params as controller only variable
form = params[:form]
i can do
form[:typ].keys
but if i get it into @form variable, and try
@form[:typ].keys
it throws error about nil object, where array is expected. What''s
wrong?
--
Posted via http://www.ruby-forum.com/.