class PaperTrail::Config
Global configuration affecting all threads. Some thread-specific configuration can be found in ‘paper_trail.rb`, others in `controller.rb`.
Attributes
association_reify_error_behaviour[RW]
has_paper_trail_defaults[RW]
object_changes_adapter[RW]
serializer[RW]
version_error_behavior[RW]
version_limit[RW]
Public Class Methods
new()
click to toggle source
# File lib/paper_trail/config.rb, line 21 def initialize # Variables which affect all threads, whose access is synchronized. @mutex = Mutex.new @enabled = true # Variables which affect all threads, whose access is *not* synchronized. @serializer = PaperTrail::Serializers::YAML @has_paper_trail_defaults = {} @version_error_behavior = :legacy end
Public Instance Methods
enabled()
click to toggle source
Indicates whether PaperTrail
is on or off. Default: true.
# File lib/paper_trail/config.rb, line 33 def enabled @mutex.synchronize { !!@enabled } end
enabled=(enable)
click to toggle source
# File lib/paper_trail/config.rb, line 37 def enabled=(enable) @mutex.synchronize { @enabled = enable } end