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

Shawn Moore sartak at bestpractical.com
Wed Feb 9 17:18:31 EST 2011


The branch, master has been updated
       via  d80d2546129647b13570d78995c77d06542fc824 (commit)
      from  539dd9acc5c80aada6786fa6c62a616d0427102c (commit)

Summary of changes:
 .../RecordHistory/Mixin/Model/RecordHistory.pm     |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit d80d2546129647b13570d78995c77d06542fc824
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Feb 9 17:18:16 2011 -0500

    after_create is invoked on an unloaded record not a class

diff --git a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
index 714db47..01c0a67 100644
--- a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
@@ -12,12 +12,12 @@ sub import {
     $class->export_to_level(1, @_);
 
     $caller->add_trigger(after_create => sub {
-        my $class = shift;
-        my $id = ${ shift @_ };
+        my $self = shift;
+        my $id   = ${ shift @_ };
 
         my $change = Jifty::Plugin::RecordHistory::Model::Change->new;
         $change->create(
-            record_class => $class,
+            record_class => ref($self),
             record_id    => $id,
             type         => 'create',
         );

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list