Sha256: 1e93556810c1eb6491bafcbe353eddcf364d14b3c6cc4dc5d970be9caa7955c9
Contents?: true
Size: 1020 Bytes
Versions: 1
Compression:
Stored size: 1020 Bytes
Contents
require 'singleton' module PaperTrailScrapbook # Global configuration affecting all threads. class Config include Singleton DEFAULT_TIME_FORMAT = '%A, %d %b %Y at %l:%M %p'.freeze DEFAULT_EVENTS = { 'create' => 'created', 'update' => 'updated', 'destroy' => 'destroyed' }.freeze SCRUB_COLUMNS = %w[updated_at created_at id].freeze UNKNOWN_WHODUNNIT = '*the app*'.freeze attr_accessor :whodunnit_class, :time_format, :events, :scrub_columns, :drop_id_suffix, :unknown_whodunnit, :filter_non_changes def initialize @whodunnit_class = nil @time_format = DEFAULT_TIME_FORMAT @events = DEFAULT_EVENTS @scrub_columns = SCRUB_COLUMNS @unknown_whodunnit = UNKNOWN_WHODUNNIT @drop_id_suffix = true @filter_non_changes = true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paper_trail_scrapbook-0.1.6 | lib/paper_trail_scrapbook/config.rb |