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

Fix warning: assigned but unused variable - timestamp

This commit is contained in:
Ryuta Kamizono 2017-05-20 06:59:17 +09:00
parent c01ea3e549
commit edc0ffc38d

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