mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:21:19 +08:00
Convert a lot of :a => b to a: b and bring peace to the world
This commit is contained in:
@ -5,7 +5,7 @@ class DiscourseRedis
|
||||
|
||||
def initialize
|
||||
@config = YAML.load(ERB.new(File.new("#{Rails.root}/config/redis.yml").read).result)[Rails.env]
|
||||
redis_opts = {:host => @config['host'], :port => @config['port'], :db => @config['db']}
|
||||
redis_opts = {host: @config['host'], port: @config['port'], db: @config['db']}
|
||||
redis_opts[:password] = @config['password'] if @config['password']
|
||||
@redis = Redis.new(redis_opts)
|
||||
end
|
||||
|
Reference in New Issue
Block a user