[Ruby] Dumb ActiveRecord question

Frederick Alger fred at fredalger.net
Fri Jan 5 14:43:47 PST 2007


> I don't understand ActiveRecord that well, but my first thought is
> that in development mode model classes are reloaded on every request
> -- are you running in development mode?

Correct — if you want data to persist between requests, it must be in  
the session, the flash, or the database.  Someone correct me if I'm  
wrong, but by understanding is:

- Rails is not thread safe.
- Each request is handled by reloading the environment and  
instantiating the appropriate controller to handle the request.

If this is correct, it begs the question "how is this efficient?"   
How does caching the application & framework classes come into play?


- Fred Alger
fred.design
fred at fredalger.net



More information about the Ruby mailing list