Skip to content

Commit

Permalink
Sort out indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesu committed Nov 26, 2009
1 parent 83a72aa commit 4a084ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Expand Up @@ -8,7 +8,7 @@
# Note: make sure you have keys in config/config.yml
ActionController::Base.session = {
:key => AppConfig.session_key,
:secret => AppConfig.session_secret
:secret => AppConfig.session_secret
}

# Use the database for sessions instead of the cookie-based default,
Expand Down
14 changes: 7 additions & 7 deletions lib/config_system.rb
Expand Up @@ -31,14 +31,14 @@ def self.init
# Determine what we are running under
AppConfig.server = self.detect_server

# Load from app_keys.yml for session keys
session_key_settings = YAML.load_file("config/app_keys.yml") rescue {}
# Load from config.yml if it's present
config_yml_settings = YAML.load_file('config/config.yml')[RAILS_ENV] rescue {}
# Load from app_keys.yml for session keys
session_key_settings = YAML.load_file("config/app_keys.yml") rescue {}
# Load from config.yml if it's present
config_yml_settings = YAML.load_file('config/config.yml')[RAILS_ENV] rescue {}

session_key_settings.merge(config_yml_settings).merge(ENV).each do |key, value|
AppConfig.send("#{key}=", value)
end
session_key_settings.merge(config_yml_settings).merge(ENV).each do |key, value|
AppConfig.send("#{key}=", value)
end
end

def self.detect_server
Expand Down

0 comments on commit 4a084ff

Please sign in to comment.