method

touch_attributes_with_time

rails latest stable - Class: ActiveRecord::Timestamp

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

touch_attributes_with_time(*names, time: nil)
public

No documentation available.

# File activerecord/lib/active_record/timestamp.rb, line 56
      def touch_attributes_with_time(*names, time: nil)
        attribute_names = timestamp_attributes_for_update_in_model
        attribute_names |= names.map(&:to_s)
        time ||= current_time_from_proper_timezone
        attribute_names.each_with_object({}) { |attr_name, result| result[attr_name] = time }
      end