Module: Sequel::Plugins::Timestamps::ClassMethods

Module | Sequel::Plugins::Timestamps::ClassMethods
In: | lib/sequel/plugins/timestamps.rb

### Methods

create_timestamp_overwrite? inherited set_update_timestamp_on_create?

### Attributes

create_timestamp_field | [R] | The field to store the create timestamp
update_timestamp_field | [R] | The field to store the update timestamp

### Public Instance methods

create_timestamp_overwrite?()

Whether to overwrite the create timestamp if it already exists

[Source]

        # File lib/sequel/plugins/timestamps.rb, line 33
    33:         def create_timestamp_overwrite?
    34:           @create_timestamp_overwrite
    35:         end

inherited(subclass)

Copy the class instance variables used from the superclass to the subclass

[Source]

        # File lib/sequel/plugins/timestamps.rb, line 38
    38:         def inherited(subclass)
    39:           super
    40:           [:@create_timestamp_field, :@update_timestamp_field, :@create_timestamp_overwrite, :@set_update_timestamp_on_create].each do |iv|
    41:             subclass.instance_variable_set(iv, instance_variable_get(iv))
    42:           end
    43:         end

set_update_timestamp_on_create?()

Whether to set the update timestamp to the create timestamp when creating

[Source]

        # File lib/sequel/plugins/timestamps.rb, line 46
    46:         def set_update_timestamp_on_create?
    47:           @set_update_timestamp_on_create
    48:         end

[Validate]