Hi, this seems simple but I can't figure it out. I receive post data in my rails app through a form and I want to use a redirect (instead of a render) but keep at least one of the pieces of post data alive through the redirect. How can I do this? Adding a hash on to redirect_to doesn't seem to work.
When i have to do this in PHP, i store the POST data in the session, then i remove them when i'm done using them (There's even a pattern called "post / redirect / get" that tell to do this to avoid re-post of submitted data when reloading the page).
Couldn't you do what you want this way or something similar with Rails?
May I ask you why do you need to do that?
You say that you don't know in advance where the page will be redirected to; also, you said that you aren't sure about using session because you wouldn't know when to reset it.
But, if every action (or every action in a set) can receive that post, I assume that it will not just ignore it, but that it will use it instead, so aren't you already somehow checking to see if you have to reset the session on each action?