[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 6aa8d42c7c4b20095aefc828a59d37c9e8da12b4
Shawn Moore
sartak at bestpractical.com
Wed Feb 9 17:46:24 EST 2011
The branch, master has been updated
via 6aa8d42c7c4b20095aefc828a59d37c9e8da12b4 (commit)
from 65f7c6f0c1394edd4732e69247eac67f93817118 (commit)
Summary of changes:
.../RecordHistory/Mixin/Model/RecordHistory.pm | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 6aa8d42c7c4b20095aefc828a59d37c9e8da12b4
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Feb 9 17:46:18 2011 -0500
order changes by id ascending
diff --git a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
index 8e422dc..437ed64 100644
--- a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
@@ -52,16 +52,21 @@ sub import {
sub changes {
my $self = shift;
my $changes = Jifty::Plugin::RecordHistory::Model::ChangeCollection->new;
+
$changes->limit(
column => 'record_class',
value => ref($self),
);
-
$changes->limit(
column => 'record_id',
value => $self->id,
);
+ $changes->order_by(
+ column => 'id',
+ order => 'asc',
+ );
+
return $changes;
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list