[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 7e954f1595319a69d7c91e8492d7c7ceda6ec9b6
Shawn Moore
sartak at bestpractical.com
Tue Feb 8 00:12:08 EST 2011
The branch, master has been updated
via 7e954f1595319a69d7c91e8492d7c7ceda6ec9b6 (commit)
from 93b644a61d25551bb59a275242546f5932295128 (commit)
Summary of changes:
.../Plugin/RecordHistory/Model/Transaction.pm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 7e954f1595319a69d7c91e8492d7c7ceda6ec9b6
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Feb 8 00:12:01 2011 -0500
Default created_by and modified_at in ->create
diff --git a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm b/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
index 326ca3e..9a40ff2 100644
--- a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
@@ -35,6 +35,16 @@ use Jifty::Record schema {
refers_to Jifty::Plugin::RecordHistory::Model::TransactionEntryCollection by 'transaction';
};
+sub create {
+ my $self = shift;
+ my %args = (
+ created_by => $self->current_user->user_object->id,
+ @_,
+ modified_at => DateTime->now->iso8601,
+ );
+ return $self->SUPER::create(%args);
+}
+
sub record {
my $self = shift;
my $record = $self->record_class;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list