[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 158308d759f15e00a19063ee7f0157fa052c3cea
Shawn Moore
sartak at bestpractical.com
Wed Feb 9 00:21:46 EST 2011
The branch, master has been updated
via 158308d759f15e00a19063ee7f0157fa052c3cea (commit)
from 03a1b758bbf60e8974b3658c388f177713a7684a (commit)
Summary of changes:
.../RecordHistory/Mixin/Model/RecordHistory.pm | 14 +++++++-------
.../Model/{Transaction.pm => Change.pm} | 4 ++--
.../Model/{TransactionEntry.pm => ChangeField.pm} | 12 ++++++------
3 files changed, 15 insertions(+), 15 deletions(-)
rename lib/Jifty/Plugin/RecordHistory/Model/{Transaction.pm => Change.pm} (89%)
rename lib/Jifty/Plugin/RecordHistory/Model/{TransactionEntry.pm => ChangeField.pm} (63%)
- Log -----------------------------------------------------------------
commit 158308d759f15e00a19063ee7f0157fa052c3cea
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Feb 9 00:21:28 2011 -0500
Rename Transaction to Change since transactions is a reserved word
diff --git a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
index 61f52f3..c77a877 100644
--- a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use base 'Exporter';
-our @EXPORT = qw(transactions);
+our @EXPORT = qw(changes);
sub import {
my $class = shift;
@@ -19,24 +19,24 @@ sub import {
@_,
);
- # add to the current transaction
+ # add to the current change
});
}
-sub transactions {
+sub changes {
my $self = shift;
- my $transactions = Jifty::Plugin::RecordHistory::Model::TransactionCollection->new;
- $transactions->limit(
+ my $changes = Jifty::Plugin::RecordHistory::Model::ChangeCollection->new;
+ $changes->limit(
column => 'record_class',
value => ref($self),
);
- $transactions->limit(
+ $changes->limit(
column => 'record_id',
value => $self->id,
);
- return $transactions;
+ return $changes;
}
1;
diff --git a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm b/lib/Jifty/Plugin/RecordHistory/Model/Change.pm
similarity index 89%
rename from lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
rename to lib/Jifty/Plugin/RecordHistory/Model/Change.pm
index 9a40ff2..7177b58 100644
--- a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Model/Change.pm
@@ -1,4 +1,4 @@
-package Jifty::Plugin::RecordHistory::Model::Transaction;
+package Jifty::Plugin::RecordHistory::Model::Change;
use warnings;
use strict;
@@ -32,7 +32,7 @@ use Jifty::Record schema {
is immutable;
column changes =>
- refers_to Jifty::Plugin::RecordHistory::Model::TransactionEntryCollection by 'transaction';
+ refers_to Jifty::Plugin::RecordHistory::Model::ChangeFieldCollection by 'change';
};
sub create {
diff --git a/lib/Jifty/Plugin/RecordHistory/Model/TransactionEntry.pm b/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
similarity index 63%
rename from lib/Jifty/Plugin/RecordHistory/Model/TransactionEntry.pm
rename to lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
index 4712486..1e85c36 100644
--- a/lib/Jifty/Plugin/RecordHistory/Model/TransactionEntry.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Model/ChangeField.pm
@@ -1,12 +1,12 @@
-package Jifty::Plugin::RecordHistory::Model::TransactionEntry;
+package Jifty::Plugin::RecordHistory::Model::ChangeField;
use warnings;
use strict;
use Jifty::DBI::Schema;
use Jifty::Record schema {
- column transaction =>
- refers_to Jifty::Plugin::RecordHistory::Model::Transaction,
- label is 'Transaction',
+ column change =>
+ refers_to Jifty::Plugin::RecordHistory::Model::Change,
+ label is 'Change',
is immutable;
column field =>
@@ -27,12 +27,12 @@ use Jifty::Record schema {
sub record {
my $self = shift;
- return $self->transaction->record;
+ return $self->change->record;
}
sub delegate_current_user_can {
my $self = shift;
- $self->transaction->delegate_current_user_can(@_);
+ $self->change->delegate_current_user_can(@_);
}
1;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list