Commit ae20de7a authored by Sean McGivern's avatar Sean McGivern

Merge branch '47959-rails5-redis-timewithzone' into 'master'

Resolve "[Rails5] expected "2018-05-07 13:53:08 UTC" to be an instance of ActiveSupport::TimeWithZone"

Closes #47959

See merge request gitlab-org/gitlab-ce!20000
parents c02f396b 9d5f5c43
...@@ -48,7 +48,7 @@ module RedisCacheable ...@@ -48,7 +48,7 @@ module RedisCacheable
def cast_value_from_cache(attribute, value) def cast_value_from_cache(attribute, value)
if Gitlab.rails5? if Gitlab.rails5?
self.class.type_for_attribute(attribute).cast(value) self.class.type_for_attribute(attribute.to_s).cast(value)
else else
self.class.column_for_attribute(attribute).type_cast_from_database(value) self.class.column_for_attribute(attribute).type_cast_from_database(value)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment