Skip to content

Instantly share code, notes, and snippets.

@phlegx
Created August 1, 2012 15:33
Show Gist options
  • Save phlegx/3227895 to your computer and use it in GitHub Desktop.
Save phlegx/3227895 to your computer and use it in GitHub Desktop.
## application.rb
APP_CONFIG = YAML.load(ERB.new(File.read("#{Rails.root}/config/config.yml")).result)[Rails.env]
## a view:
<div id="footer"><%= APP_CONFIG['version'] %></div>
# error
Uninitialized constant ActionView::CompiledTemplates::APP_CONFIG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment