开发者

Can I reconfigure a live Rails application?

开发者 https://www.devze.com 2023-02-03 13:11 出处:网络
Is it safe to alter application settings (config.*) on a Rails application that is already running? How can I persist the changes, preferably to a database?

Is it safe to alter application settings (config.*) on a Rails application that is already running?

How can I persist the changes, preferably to a database?

Update:

I want to allow the administ开发者_如何学JAVArator to configure things like Action Mailer through an admin control panel, but I'm not sure if Rails will pick up on the changes.


Another approach instead of querying DB is to use Environment variables.

This is how you access environment variables:

ENV['name']

You may define those variables in .bash_rc for example.

0

精彩评论

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