Sha256: c2a05146332d555a6b079bac9beceed3f5cee4718bd6236ac042f394c6f9028b
Contents?: true
Size: 684 Bytes
Versions: 9
Compression:
Stored size: 684 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../rails/reload_classes') require 'erb' module CouchPotato def self.rails_init config = YAML::load(ERB.new(File.read(Rails.root.join('config/couchdb.yml'))).result)[RAILS_ENV] if config.is_a?(String) CouchPotato::Config.database_name = config else CouchPotato::Config.database_name = config['database'] CouchPotato::Config.validation_framework = config['validation_framework'] end end if defined?(::Rails::Railtie) class Railtie < ::Rails::Railtie initializer 'couch_potato.load_config' do |app| CouchPotato.rails_init end end else rails_init end end
Version data entries
9 entries across 9 versions & 2 rubygems