In jsp, we have applifecycle listeners. For each user that logs on, and when the app is started, and when session variable is changed, you can specify a function to run. Is there something like this in Rails and any example code???
on 2005-12-30 04:47
on 2005-12-30 18:45
You can use Observers for most of what a lifecycle listener would be used for. http://www.loudthinking.com/arc/000362.html ..and pages 271 and 279 of the "Agile Web D. with Ruby on Rails" book. Further, because all of the Rails classes are open, you can add callbacks or observers to pretty much anything. Beware, though, that Rails is a share-nothing design, which means that there isn't necessarily a single application container. If you add code to "email the sys admin" when the app starts, he'll get one email for every FastCGI or SCGI process that starts.