Question about controller threading

Rails is single-threaded, so I don’t have to worry about changing
stuff around when a request is made, right? I’m going to be using
ActiveResource, but don’t know ahead of time what the class’s site
will be. So basically on every request I’ll be changing it (if I need
to). Is it okay to do that? Once a request is made, no other
requests can use the process…so as long as I update MyARes.site I
should be okay. Is there a better all around way to do it?

Pat

On Feb 6, 2:55 am, “Pat M.” [email protected] wrote:

Rails is single-threaded, so I don’t have to worry about changing
stuff around when a request is made, right? I’m going to be using
ActiveResource, but don’t know ahead of time what the class’s site
will be. So basically on every request I’ll be changing it (if I need
to). Is it okay to do that? Once a request is made, no other
requests can use the process…so as long as I update MyARes.site I
should be okay. Is there a better all around way to do it?

Pat

Seems like a fine approach to me, although I am not very familiar with
ARes. Jamis just posted about setting the timezone per request, which
has the same approach:
http://weblog.jamisbuck.org/2007/2/2/introducing-tztime

Dan M.