Initialize function for Application

Hi,

I have to write a initialize function , which should be called on the
startup of the rails application and only once during the startup.

This function creates a graph adding edges read from database.(I ahve
code written for this). Wondering what is the right point to populate
graph in the memory by calling this function.

Regards,
Sandeep G

Sandeep G. wrote:

I have to write a initialize function , which should be called on the
startup of the rails application and only once during the startup.

You could call it from config/environment.rb but don’t put all the code
in there. Put the code elsewhere and call into it.