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 Development 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.
On 12/29/05, McClain <jmcclain1-9byIcQoa8qfk1uMJSBkQmQ@public.gmane.org>
wrote:>
>
>
> 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???
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>