diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-01-17 17:12:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 17:12:57 -0500 |
commit | e65a3a0ce585b1fbcd35872616717595d6950fca (patch) | |
tree | f1373015e625acc65fd0997cbf61a2a63e1b6720 /activerecord/lib/active_record/timestamp.rb | |
parent | cc0dd1d371868fe34fba6b58d22a8ba0714d8ae7 (diff) | |
parent | 4d51efe24e461a2a3ed562787308484cd48370c7 (diff) | |
download | rails-e65a3a0ce585b1fbcd35872616717595d6950fca.tar.gz rails-e65a3a0ce585b1fbcd35872616717595d6950fca.tar.bz2 rails-e65a3a0ce585b1fbcd35872616717595d6950fca.zip |
Merge pull request #34954 from rails/rm-remove-5.2-deprecations
Remove all code deprecated in Rails 5.2
Diffstat (limited to 'activerecord/lib/active_record/timestamp.rb')
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index e19077eb88..2345db7138 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -133,11 +133,10 @@ module ActiveRecord self.class.send(:current_time_from_proper_timezone) end - def max_updated_column_timestamp(timestamp_names = timestamp_attributes_for_update_in_model) - timestamp_names - .map { |attr| self[attr] } + def max_updated_column_timestamp + timestamp_attributes_for_update_in_model + .map { |attr| self[attr]&.to_time } .compact - .map(&:to_time) .max end |