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-2.0.2 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-2.0.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.8 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.7 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.6 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.5 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.4 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.1 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.2.0 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.15 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.14 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.13 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.12 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.11 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.10 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.9 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.8 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.7 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.6 app/extensions/concerns/head_row/timestamp_extensions.rb
itsf_backend-1.1.5 app/extensions/concerns/head_row/timestamp_extensions.rb