Module: ActiveRecord::Timestamp::ClassMethods
Do not use. This module is for internal use only.
| Relationships & Source Files | |
| Defined in: | activerecord/lib/active_record/timestamp.rb |
Instance Method Summary
Instance Method Details
#all_timestamp_attributes_in_model
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 72
def schema_context. end
#current_time_from_proper_timezone
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 76
def current_time_from_proper_timezone with_connection { |c| c.default_timezone == :utc ? Time.now.utc : Time.now } end
#timestamp_attributes_for_create
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 80
def ["created_at", "created_on"].map! { |name| attribute_aliases[name] || name } end
#timestamp_attributes_for_create_in_model
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 64
def schema_context. end
#timestamp_attributes_for_update
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 84
def ["updated_at", "updated_on"].map! { |name| attribute_aliases[name] || name } end
#timestamp_attributes_for_update_in_model
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 68
def schema_context. end
#touch_attributes_with_time(*names, time: nil)
[ GitHub ]# File 'activerecord/lib/active_record/timestamp.rb', line 56
def touch_attributes_with_time(*names, time: nil) names = names.map(&:to_s) names = names.map { |name| attribute_aliases[name] || name } attribute_names = attribute_names |= names attribute_names.index_with(time || current_time_from_proper_timezone) end