How to implement a singleton model

后端 未结 13 1367
余生分开走
余生分开走 2020-12-24 12:36

I have a site in rails and want to have site-wide settings. One part of my app can notify the admin by SMS if a specific event happens. This is an example of a feature that

13条回答
  •  春和景丽
    2020-12-24 12:55

    You might also check out Configatron:

    http://configatron.mackframework.com/

    Configatron makes configuring your applications and scripts incredibly easy. No longer is a there a need to use constants or global variables. Now you can use a simple and painless system to configure your life. And, because it‘s all Ruby, you can do any crazy thing you would like to!

提交回复
热议问题