Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
51f5ee33
Commit
51f5ee33
authored
May 17, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Gitlab.rails5? for checking if on rails5
parent
eeb955a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/models/concerns/redis_cacheable.rb
app/models/concerns/redis_cacheable.rb
+3
-3
No files found.
app/models/concerns/redis_cacheable.rb
View file @
51f5ee33
...
...
@@ -45,10 +45,10 @@ module RedisCacheable
end
def
cast_value_from_cache
(
attribute
,
value
)
if
self
.
class
.
column_for_attribute
(
attribute
).
respond_to?
(
:type_cast_from_database
)
self
.
class
.
column_for_attribute
(
attribute
).
type_cast_from_database
(
value
)
else
if
Gitlab
.
rails5?
self
.
class
.
type_for_attribute
(
attribute
).
cast
(
value
)
else
self
.
class
.
column_for_attribute
(
attribute
).
type_cast_from_database
(
value
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment