Nerian
Nerian

Reputation: 16177

Rails3: How do I set variables for the app depending on the ENVIRONMENT

If my app has to behave differently according to the ENV state: production, testing or development, 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

Upvotes: 0

Views: 134

Answers (1)

Ryan Bigg
Ryan Bigg

Reputation: 107718

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.

Upvotes: 1

Related Questions