about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2019-02-03 03:11:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-02 19:11:38 +0100
commitbcfff65195f557dc086470f91b4c90b15c004cf7 (patch)
treecdf805998758278b41cd8ab0cc8dd864d8047c57 /app/models/concerns
parent6a5e3da6b044e50635d293c2716883cc5627e4c8 (diff)
Create Redisable#redis (#9633)
* Create Redisable

* Use #redis instead of Redis.current
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/redisable.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/concerns/redisable.rb b/app/models/concerns/redisable.rb
new file mode 100644
index 000000000..c6cf97359
--- /dev/null
+++ b/app/models/concerns/redisable.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module Redisable
+  extend ActiveSupport::Concern
+
+  private
+
+  def redis
+    Redis.current
+  end
+end