If my app has to behave differently according to the ENV state: production, testing or develo开发者_StackOverflow中文版pment, how do I set those variables?
For example, if I am in production i want the variable @subdomains = 2 and if I am in development then @subdomains = 1
Set these in config/environments/production.rb and config/environments/development.rb and then if you're running a server, restart it for the changes to these files to take effect.
精彩评论