Sha256: 56734468d680cd038cd229197fba76fa095c6b9b37adb2309a344ed76a23d70b
Contents?: true
Size: 544 Bytes
Versions: 4
Compression:
Stored size: 544 Bytes
Contents
# frozen_string_literal: true module ActiveArchive module TableDefinition def timestamps(*args) options = args.extract_options! column(:created_at, :datetime, options) column(:updated_at, :datetime, options) return unless ActiveArchive.configuration.all_records_archivable == true return if options[:archive] == false options[:null] = true column(:archived_at, :datetime, options) end end end ActiveRecord::ConnectionAdapters::TableDefinition.prepend(ActiveArchive::TableDefinition)
Version data entries
4 entries across 4 versions & 1 rubygems