[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 9f4da81426585809aeae7f6b5a1323da1f7a29bc

Shawn Moore sartak at bestpractical.com
Wed Feb 9 23:10:04 EST 2011

The branch, master has been updated
       via  9f4da81426585809aeae7f6b5a1323da1f7a29bc (commit)
      from  a25c64450f686008652f9fac8434e71a10b16d43 (commit)

Summary of changes:
 lib/Jifty/Plugin/RecordHistory.pm |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 9f4da81426585809aeae7f6b5a1323da1f7a29bc
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Feb 9 23:09:57 2011 -0500

    Doc for views

diff --git a/lib/Jifty/Plugin/RecordHistory.pm b/lib/Jifty/Plugin/RecordHistory.pm
index 0a437f6..6433840 100644
--- a/lib/Jifty/Plugin/RecordHistory.pm
+++ b/lib/Jifty/Plugin/RecordHistory.pm
@@ -38,12 +38,29 @@ and using the mixin to your record class(es) to enjoy transaction history. The
 mixin even hooks into Jifty itself to observe record creation, updates, and
+=head2 Grouping
 By default, the only mechanism that groups together change_fields onto a single
 change object is L<Jifty::Action::Record::Update> (and its subclasses that do
 not override C<take_action>). But if you want to make a number of field updates
 that need to be grouped into a single logical change, you can call
 C<start_change> and C<end_change> yourself on the record object.
+=head2 Views
+If you want to display changes for a record class, mount the following into
+your view tree to expose a default view at C</foo/history?id=42> (or you can of
+course set C<id> via dispatcher rule).
+    use Jifty::Plugin::RecordHistory::View;
+    alias Jifty::Plugin::RecordHistory::View under '/foo/history', {
+        object_type => 'Foo',
+    };
+Alternatively, if you want to extend the default templates, you can subclass
+L<Jifty::Plugin::RecordHistory::View> in the same way as
 =head1 SEE ALSO


More information about the Bps-public-commit mailing list