Commit 51f5ee33 authored by Matija Čupić's avatar Matija Čupić

Use Gitlab.rails5? for checking if on rails5

parent eeb955a6
...@@ -45,10 +45,10 @@ module RedisCacheable ...@@ -45,10 +45,10 @@ module RedisCacheable
end end
def cast_value_from_cache(attribute, value) def cast_value_from_cache(attribute, value)
if self.class.column_for_attribute(attribute).respond_to?(:type_cast_from_database) if Gitlab.rails5?
self.class.column_for_attribute(attribute).type_cast_from_database(value)
else
self.class.type_for_attribute(attribute).cast(value) self.class.type_for_attribute(attribute).cast(value)
else
self.class.column_for_attribute(attribute).type_cast_from_database(value)
end end
end end
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