Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

load the config.yml in the top of the environment file, so that it wi…

…ll always be available before any of the initializers
  • Loading branch information...
commit 2c177acb1ec689490d616146a9b76ed26c775640 1 parent 8c5db1e
@timriley authored
Showing with 5 additions and 3 deletions.
  1. +5 −1 config/environment.rb
  2. +0 −2  config/initializers/02_config.rb
View
6 config/environment.rb
@@ -10,6 +10,9 @@
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
+require 'yaml'
+APP_CONFIG = YAML.load(File.read(File.join(RAILS_ROOT, 'config', 'config.yml')))[RAILS_ENV]
+
Rails::Initializer.run do |config|
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -29,6 +32,7 @@
config.gem 'validatable'
config.gem 'flickraw'
config.gem 'will_paginate'
+ config.gem 'liquid'
# Only load the plugins named here, in the order given. By default, all plugins
# in vendor/plugins are loaded in alphabetical order.
@@ -68,4 +72,4 @@
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
-end
+end
View
2  config/initializers/02_config.rb
@@ -1,2 +0,0 @@
-raw_config = File.read(RAILS_ROOT + "/config/config.yml")
-APP_CONFIG = YAML.load(raw_config)[RAILS_ENV]
Please sign in to comment.
Something went wrong with that request. Please try again.