开发者

Rails: Initialization Code for Redis: Where to put?

开发者 https://www.devze.com 2023-03-28 03:38 出处:网络
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 rig

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

精彩评论

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