README.rdoc in track_changes-0.4.1 vs README.rdoc in track_changes-0.5.0

- old
+ new

@@ -32,9 +32,21 @@ class Post < ActiveRecord::Base has_many :audits, :as => :audited end +You can also tweak some of the defaults by creating an initializer +in <tt>RAILS_ROOT/config/initializers/track_changes_configuration.rb</tt> +and calling TrackChanges::Initializer.instance which yields a +TrackChanges::Configuration object: + + # These are the defaults anyways + TrackChanges::Initializer.instance do |c| + c.audit_assocation = :audits # Calls <tt>create!</tt> on this association method + c.current_user = :current_user # Controller is sent this method to obtain current user. + c.ignore_nil = true # Don't crash if a model is nil. + end + == Controller Example In this example, after the `update` action is called, the `@post` will be compared to a previous version, and if there are any changes, an audit will be created.