开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜