1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #29153 from kamipo/fix_warning_assigned_but_unused_variable

Fix `warning: assigned but unused variable - timestamp`
This commit is contained in:
Kasper Timm Hansen 2017-05-20 09:30:37 +02:00 committed by GitHub
commit 055535fd1b

View file

@ -97,7 +97,7 @@ module ActiveRecord
# +false+ (which it is by default until Rails 6.0).
def cache_version
if cache_versioning && timestamp = try(:updated_at)
updated_at.utc.to_s(:usec)
timestamp.utc.to_s(:usec)
end
end