summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/concerns/redis_cacheable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/redis_cacheable.rb b/app/models/concerns/redis_cacheable.rb
index 0dd15734eae..bc86bbe6525 100644
--- a/app/models/concerns/redis_cacheable.rb
+++ b/app/models/concerns/redis_cacheable.rb
@@ -7,7 +7,7 @@ module RedisCacheable
class_methods do
def cached_attr_reader(*attributes)
attributes.each do |attribute|
- define_method("#{attribute}") do
+ define_method(attribute) do
cached_attribute(attribute) || read_attribute(attribute)
end
end
@@ -15,7 +15,7 @@ module RedisCacheable
def cached_attr_time_reader(*attributes)
attributes.each do |attribute|
- define_method("#{attribute}") do
+ define_method(attribute) do
cached_value = cached_attribute(attribute)
cached_value ? Time.zone.parse(cached_value) : read_attribute(attribute)
end