Saving a request in the session

I have a filter that checks if the user is logged in and goes through
the login process if he is not. I’d like to store the complete request
in the session so that I can then replay it exactly, allowing for
post/get to both work. Is this possible at all?

Pedro.

On 7/11/06, Pedro Côrte-Real [email protected] wrote:

I have a filter that checks if the user is logged in and goes through
the login process if he is not. I’d like to store the complete request
in the session so that I can then replay it exactly, allowing for
post/get to both work. Is this possible at all?

Seems like it’s not. How about this:

  • Store the controller, action and parameters in the session
    A few requests later:

  • Create a new controller

  • Create a new request and fill it with the parameters

  • Run the controller with the filled request

Is there any clean way to do this or would I have to muck with rails
internals? Basically what I’m doing is a post request internally to
use as the response to another request.

Cheers,

Pedro.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs