app/models/concerns/without_timestamp.rb

Summary

Maintainability
A
0 mins
Test Coverage
module WithoutTimestamp
  extend ActiveSupport::Concern

  def without_timestamps
    old = ActiveRecord::Base.record_timestamps
    ActiveRecord::Base.record_timestamps = false
    begin
      yield
    ensure
      ActiveRecord::Base.record_timestamps = old
    end
  end

end