开发者

Rails: Initialization Code for Redis: Where to put?

I have some initialization code in Ruby that initializes a Redis database with some values. Where is the best place to put this code in the Rails application? I wa开发者_如何学Cnt this code to run right after everything is deployed. I'm using Passenger if that helps.


Code that loads stuff once per app load (initializers) belongs in $RAILS_ROOT/config/initializers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜