From 43c95ec4cd0c9569c162223bfa13e8441c947a51 Mon Sep 17 00:00:00 2001 From: Chris Peters Date: Sat, 12 Nov 2016 20:11:16 -0500 Subject: [PATCH] Update documentation generator to include new Draftsman.whodunnit_field setting [ci skip] --- README.md | 6 +++--- .../draftsman/templates/config/initializers/draftsman.rb | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ae631ca..356b433 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,9 @@ Add `has_drafts` to the models you want to have drafts on. Draftsman provides a helper extension that acts similarly to the controller mixin it provides for Rails applications. -It will set `Draftsman.whodunnit` to whatever is returned by a method named -`user_for_paper_trail`, which you can define inside your Sinatra Application. -(By default, it attempts to invoke a method named `current_user`.) +It will set `Draftsman::Draft#whodunnit` to whatever is returned by a method +named `user_for_paper_trail`, which you can define inside your Sinatra +application. (By default, it attempts to invoke a method named `current_user`.) If you're using the modular [`Sinatra::Base`][8] style of application, you will need to register the extension: diff --git a/lib/generators/draftsman/templates/config/initializers/draftsman.rb b/lib/generators/draftsman/templates/config/initializers/draftsman.rb index 2498f42..7fd92c4 100644 --- a/lib/generators/draftsman/templates/config/initializers/draftsman.rb +++ b/lib/generators/draftsman/templates/config/initializers/draftsman.rb @@ -13,3 +13,6 @@ # Field which records when a draft was created. # Draftsman.timestamp_field = :created_at + +# Field which records who last recorded the draft. +# Draftsman.whodunnit_field = :whodunnit