Reputation: 10888
I am working on a Rails application. I want to execute a piece of code only during server start-up. Where do I add this code?
Upvotes: 3
Views: 97
Reputation: 43298
In config/initializers
. All the .rb
files in that directory will only be run when the server is started.
Upvotes: 6