Sha256: 60d6a40adf757948ecf27592c34d2048bb6227f763946569c7b0dd72ee5d3585
Contents?: true
Size: 718 Bytes
Versions: 14
Compression:
Stored size: 718 Bytes
Contents
# -*- encoding : utf-8 -*- module AbAdmin module Concerns module Silencer def no_timestamps(&block) original_setting = ActiveRecord::Base.record_timestamps ActiveRecord::Base.record_timestamps = false begin yield ensure ActiveRecord::Base.record_timestamps = original_setting end end def no_versions(&block) original_setting = PaperTrail.enabled? PaperTrail.enabled = false begin yield ensure PaperTrail.enabled = original_setting end end def full_silence(&block) no_timestamps do no_versions(&block) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems