diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-05-16 22:49:09 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-05-16 22:49:09 +0300 |
commit | 4e1bb1d1014237df79db6b3cc2beb24228a4b228 (patch) | |
tree | 9419b6d67e9e0957ee39839a607cfd34829a0bba /spec/models | |
parent | a4b0876b391f0717365cabd78cf9715b64649797 (diff) |
Move argument check to cached getter definition class method
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/concerns/redis_cacheable_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/concerns/redis_cacheable_spec.rb b/spec/models/concerns/redis_cacheable_spec.rb index 2da0f33e27b..089ae080b0c 100644 --- a/spec/models/concerns/redis_cacheable_spec.rb +++ b/spec/models/concerns/redis_cacheable_spec.rb @@ -11,8 +11,8 @@ describe RedisCacheable do cached_value end - def has_attribute?(attribute) - attributes.has_key?(attribute) + def self.attribute_names + %w[name time] end end end |