module TrackChanges
class Configuration
# The association used to create an audit. Defaults to
# :audits
#
# Example:
# :audits # => Call model.audits.create
# :changes # => Call model.changes.create
attr_accessor :audit_association
# The controller method called to obtain the current user.
# Defaults to :current_user
attr_accessor :current_user
# Ignore if the audited item is nil. Defaults to true.
attr_accessor :ignore_nil
def initialize
self.audit_association = default_audit_association
self.current_user = default_current_user
self.ignore_nil = default_ignore_nil
end
private
def default_audit_association
:audits
end
def default_current_user
:current_user
end
def default_ignore_nil
true
end
end
end