README.md in effective_logging-1.9.0 vs README.md in effective_logging-1.10.0

- old
+ new

@@ -100,20 +100,20 @@ Any email sent by the application will be automatically logged. This behaviour can be disabled in the config/initializers/effective_logging.rb initializer. -If the TO email address match a User, the :user will be set appropriately. +If the TO email address match a User, the :associated will be set to this user. You can specify additional fields to be logged via your mailer: ```ruby def notify_admin_of_new_post(post) mail( to: 'admin@example.com', subject: 'A new post was created', - log: { :associated => post, :title => post.title } + log: { :post => post, :title => post.title } ) end ``` ### Automatic Logging of User Login and Logout @@ -227,11 +227,11 @@ And on each create / destroy / update, a full dump of all current attributes is saved, forming an audit log. There is some initial support for passing `only`, `except`, and `additionally` to the mixin to customize what attributes are saved. -Define your model with `log_changes additionally: [:method1, :method2]` to also log the value of methods. +Define your model with `log_changes additionally: [:method1, :method2]` to also _always_ log the value of that method. Even if it's unchanged. Apply your own formatting to the logged title of each attribute by creating an instance method on the resource: ```ruby # Format the title of this attribute. Return nil to use the default attribute.titleize @@ -326,10 +326,10 @@ ### Build a User Specific Logs Screen We can also use a similar method to create a datatable of logs for just one user. -When initialized with :user_id, the 'User' column is hidden and the Logs are scoped to the User. +When initialized with :user_id, the 'User' column is hidden and the Logs are scoped to any logs where this user is the User or Associated column. In your controller: ```ruby @user = User.find(params[:id])