[Bps-public-commit] App-Changeloggr branch, master, updated. fe72adac88bea2147f64fd060d72c8f4baba57f4

sartak at bestpractical.com sartak at bestpractical.com
Wed Apr 29 12:47:49 EDT 2009


The branch, master has been updated
       via  fe72adac88bea2147f64fd060d72c8f4baba57f4 (commit)
      from  80b5acaac21d3fc222a016ba7cee59f5c2709462 (commit)

Summary of changes:
 lib/App/Changeloggr/Model/Change.pm |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit fe72adac88bea2147f64fd060d72c8f4baba57f4
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 29 12:47:40 2009 -0400

    Factor a votes method out into Change

diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index 6cb9fdf..d037e71 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -51,10 +51,16 @@ sub current_user_can {
     return $self->SUPER::current_user_can($right, @_);
 }
 
-sub grouped_votes {
-    my $self = shift;
+sub votes {
+    my $self = shif;
     my $votes = App::Changeloggr::Model::VoteCollection->new;
     $votes->limit( column => 'change_id', value => $self->id );
+    return $votes;
+}
+
+sub grouped_votes {
+    my $self = shift;
+    my $votes = $self->votes;
     $votes->column(
         column => 'tag',
     );

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



More information about the Bps-public-commit mailing list