开发者

In a Rails project, we put all constants definition in config/environment.rb and more particular ones in config/environments/development.rb?

开发者 https://www.devze.com 2023-01-21 07:33 出处:网络
Is that the usual convention?The more general constants in config/environment.rb, and more particular ones, such as HOST_NAME for development mode

Is that the usual convention? The more general constants in config/environment.rb, and more particular ones, such as HOST_NAME for development mode in config/environments/development.rb as localhost:3000, in config/environments/production.rb as 开发者_运维技巧www.mygreatwebsite.com, and they will automatically get included into the project?


The config files test/production/development.rb are used when the rails application is started in one of these specific environments (test/production/development). The config.rb is used to define configuration which applies to all environments.

0

精彩评论

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