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

Shawn Moore sartak at bestpractical.com
Sat Feb 12 00:03:18 EST 2011


The branch, master has been updated
       via  c213d0ebd7e3685e6ad01a7a1e68fe6f156aea62 (commit)
      from  62e3fedba1efefad60609249ebb9f16025c7a3e1 (commit)

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

- Log -----------------------------------------------------------------
commit c213d0ebd7e3685e6ad01a7a1e68fe6f156aea62
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Sat Feb 12 00:03:07 2011 -0500

    Need to pull out the change from %args in case of create

diff --git a/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm b/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
index 1e85c36..aef6343 100644
--- a/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
@@ -32,7 +32,12 @@ sub record {
 
 sub delegate_current_user_can {
     my $self  = shift;
-    $self->change->delegate_current_user_can(@_);
+    my $right = shift;
+    my %args  = @_;
+
+    my $change = $args{change} || $self->change;
+
+    $change->delegate_current_user_can($right, %args);
 }
 
 1;

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



More information about the Bps-public-commit mailing list