to summarize i have an action that takes a bunch of form params and
looks at everything… depending on what is provided it passes these
params off to different actions. the code i had before put the unsaved
active record object in the flash where its attr_accessors got nicely
preserved where it was retrieved from the flash in the next action.
worked well and got the job done, but caused me much grief trying to
write a functional test for this (see my ‘functional testing woes’
topic for more details)… i’ve since tried to switch the code so
instead of putting it in the flash i pass it along as params… now why
doesn’t this work?
receive the params:
@person = params[:person]
look at @person to determine which action to branch off to…
PROBLEM:
redirect_to :action => ‘branch1’, :person => @person
^next action gets params[:person] => nil
tried this also:
redirect_to :action => ‘branch1’, :person => params[:person]
^gets stringify keys error and params[:person] contains a big long
string instead of actual hash
and tried this too:
redirect_to :action => ‘branch1’, params
^it really hates this one
so how do i do this? should i just stick to my flash hackery?