Created
January 8, 2009 19:03
-
-
Save lukaskonarovsky/44838 to your computer and use it in GitHub Desktop.
Placing App Config outside enviroment files into YML.
This file contains 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
# Load application specific configuration | |
require 'ostruct' | |
AppConfig = OpenStruct.new(YAML.load_file('config/config.yml')[Rails.env]) | |
Rails::Initializer.run do |config| | |
# Sessions | |
config.action_controller.session_store = :active_record_store | |
config.action_controller.session = { | |
:session_key => AppConfig.session_key, | |
:secret => AppConfig.secret, | |
:session_domain => AppConfig.session_domain | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment