Created
October 31, 2012 18:52
-
-
Save chumpy/3989073 to your computer and use it in GitHub Desktop.
Rails app contants in YAML file (adapted from http://goo.gl/9EuAh)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this goes in config/initializers | |
| APP_CONFIG = YAML.load(File.read(File.expand_path('../../app_constants.yml', __FILE__)))[Rails.env] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this goes in config/ | |
| # these values can be accessed via my_const1 = APP_CONFIG['my_const1'] | |
| defaults: &defaults | |
| my_const1: some value | |
| my_const2: some other value | |
| development: | |
| <<: *defaults | |
| test: | |
| <<: *defaults | |
| production: | |
| <<: *defaults |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment