Sha256: 8382b93a5d3f0e04539b2c63b3aa93dfdcf5c325a414b8c82d4ed668f7409a9f
Contents?: true
Size: 375 Bytes
Versions: 13
Compression:
Stored size: 375 Bytes
Contents
require 'redis' module RedisConnection def self.connect(env) redis_config = YAML.load_file(File.join(Rails.root, "config", "redis.yml"))[env] raise 'RedisConnection can not connect because it is not configured' if redis_config.nil? $redis = Redis.new(:host => redis_config['host'], :port => redis_config['port']) end end RedisConnection.connect(Rails.env)
Version data entries
13 entries across 13 versions & 1 rubygems