instance method touch_attributes_with_time

Ruby on Rails 5.1.7

Since v5.1.7 Last seen in v5.1.7

Signature

touch_attributes_with_time(*names, time: nil)

No documentation comment.

Parameters

names rest
time key = nil
Source
# 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

Defined in activerecord/lib/active_record/timestamp.rb line 56 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Timestamp

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close