receiving params and passing them to another action HELP

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?

There's probably a way to do this, but have you considered making your dispatcher action a private method in application.rb? You could then use real actions that would call the private method and then redirect or do whatever else they need to.

It would make it much easier to test and the code more readable. It'd be a little less DRY, but that's probably ok. Forgive me if I'm not understanding your issue correctly.

Cheers, John

i'll give these suggestions a try.. thanks!