Sha256: d7891948e1df6eb47ba57694c63b4c4b7ab159c6e3838c402dfea28f8d70dab8

Contents?: true

Size: 451 Bytes

Versions: 46

Compression:

Stored size: 451 Bytes

Contents

require 'active_support/concern'

module HeadRow
  module TimestampExtensions
    extend ActiveSupport::Concern

    def timestamp(attribute_name, _options = {})
      column attribute_name
    end

    def timestamps
      timestamp :created_at
      timestamp :updated_at
    end

    def column_timestamps
      ActiveSupport::Deprecation.warn('Do not use table.column_timestamps. Use table.timestamps instead!')
      timestamps
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
itsf_backend-5.0.0.pre app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.2.3 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.2.2 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.2.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.2.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.0.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-4.0.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.1.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.1.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.7 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.6 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.5 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.4 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.3 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.2 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-3.0.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-2.2.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-2.2.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-2.1.0 app/extensions/concerns/head_row/timestamp_extensions.rb