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

sartak at bestpractical.com sartak at bestpractical.com
Wed Apr 1 14:51:05 EDT 2009


The branch, master has been updated
       via  71ee485cd8b91bebb2377c22aac31b8ca971e6f2 (commit)
       via  016ff1104d9602e42c42cf8aa0c909c7532644bb (commit)
       via  9904b38a0241f60fb5a5c82c5a1469f920fcc701 (commit)
      from  1e13922af65ee361f0bd76d93fed7ab467602292 (commit)

Summary of changes:
 lib/App/Changeloggr/Model/Change.pm              |    4 ++--
 lib/App/Changeloggr/Model/ChangeCollection.pm    |    2 +-
 lib/App/Changeloggr/Model/Changelog.pm           |    8 ++++----
 lib/App/Changeloggr/Model/ChangelogCollection.pm |    2 +-
 lib/App/Changeloggr/Model/Tag.pm                 |    2 +-
 lib/App/Changeloggr/Model/Vote.pm                |    2 +-
 lib/App/Changeloggr/View.pm                      |    6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit 9904b38a0241f60fb5a5c82c5a1469f920fcc701
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 1 14:47:19 2009 -0400

    Append _id to our reference columns, since "change" is reserved in MySQL

diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index 7e16ee8..c536e25 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -5,7 +5,7 @@ package App::Changeloggr::Model::Change;
 use Jifty::DBI::Schema;
 
 use App::Changeloggr::Record schema {
-    column changelog =>
+    column changelog_id =>
         refers_to App::Changeloggr::Model::Changelog,
         is mandatory,
         is immutable;
diff --git a/lib/App/Changeloggr/Model/Tag.pm b/lib/App/Changeloggr/Model/Tag.pm
index 999a4c0..b2384c9 100644
--- a/lib/App/Changeloggr/Model/Tag.pm
+++ b/lib/App/Changeloggr/Model/Tag.pm
@@ -5,7 +5,7 @@ package App::Changeloggr::Model::Tag;
 use Jifty::DBI::Schema;
 
 use App::Changeloggr::Record schema {
-    column changelog =>
+    column changelog_id =>
         refers_to App::Changeloggr::Model::Changelog,
         is mandatory,
         is immutable;
diff --git a/lib/App/Changeloggr/Model/Vote.pm b/lib/App/Changeloggr/Model/Vote.pm
index e69ae80..7c0f810 100644
--- a/lib/App/Changeloggr/Model/Vote.pm
+++ b/lib/App/Changeloggr/Model/Vote.pm
@@ -6,7 +6,7 @@ use Jifty::DBI::Schema;
 use Scalar::Defer 'defer';
 
 use App::Changeloggr::Record schema {
-    column change =>
+    column change_id =>
         refers_to App::Changeloggr::Model::Change,
         is mandatory,
         is immutable,

commit 016ff1104d9602e42c42cf8aa0c909c7532644bb
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 1 14:49:30 2009 -0400

    changelog -> changelog_id in queries

diff --git a/lib/App/Changeloggr/Model/ChangeCollection.pm b/lib/App/Changeloggr/Model/ChangeCollection.pm
index 6a5e3d9..b503e43 100644
--- a/lib/App/Changeloggr/Model/ChangeCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangeCollection.pm
@@ -32,7 +32,7 @@ sub create_from_parser {
 
         my ($ok, $msg) = $change->create(
             %$fields,
-            changelog => $changelog,
+            changelog_id => $changelog,
         );
 
         if ($ok) {
diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index 62081ac..fce72c6 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -67,13 +67,13 @@ sub add_changes {
 sub changes {
     my $self = shift;
 
-    return M('ChangeCollection', changelog => $self);
+    return M('ChangeCollection', changelog_id => $self);
 }
 
 sub tags {
     my $self = shift;
 
-    return M('TagCollection', changelog => $self);
+    return M('TagCollection', changelog_id => $self);
 }
 
 sub choose_change {
@@ -82,7 +82,7 @@ sub choose_change {
     # This will become more advanced in the future, picking a change that
     # the current user has not voted on yet, ordered by the confidence of the
     # top tag. But for now.. an arbitrary change belonging to this changelog.
-    my $changes = M('ChangeCollection', changelog => $self);
+    my $changes = M('ChangeCollection', changelog_id => $self);
     my $votes = $changes->join(
         type => 'left',
         column1 => 'id',
diff --git a/lib/App/Changeloggr/Model/ChangelogCollection.pm b/lib/App/Changeloggr/Model/ChangelogCollection.pm
index 1d32d45..1f1d6c5 100644
--- a/lib/App/Changeloggr/Model/ChangelogCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangelogCollection.pm
@@ -14,7 +14,7 @@ sub with_changes {
         alias1  => 'main',
         column1 => 'id',
         table2  => 'changes',
-        column2 => 'changelog',
+        column2 => 'changelog_id',
     );
 
     #$self->limit(
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 7012ff9..4dcef05 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -158,7 +158,7 @@ sub show_vote_form {
 
 sub edit_tags {
     my $changelog = shift;
-    my $tags = M("TagCollection", changelog => $changelog);
+    my $tags = M("TagCollection", changelog_id => $changelog);
 
     while (my $tag = $tags->next) {
         form {

commit 71ee485cd8b91bebb2377c22aac31b8ca971e6f2
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Apr 1 14:50:39 2009 -0400

    change -> change_id in queries

diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index c536e25..6cb9fdf 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -54,7 +54,7 @@ sub current_user_can {
 sub grouped_votes {
     my $self = shift;
     my $votes = App::Changeloggr::Model::VoteCollection->new;
-    $votes->limit( column => 'change', value => $self->id );
+    $votes->limit( column => 'change_id', value => $self->id );
     $votes->column(
         column => 'tag',
     );
diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index fce72c6..573e8d5 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -87,7 +87,7 @@ sub choose_change {
         type => 'left',
         column1 => 'id',
         table2 => 'votes',
-        column2 => 'change',
+        column2 => 'change_id',
         is_distinct => 1,
     );
     $changes->limit(
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 4dcef05..fc79528 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -133,7 +133,7 @@ sub show_vote_form {
     form {
         my $vote = new_action(
             class     => "CreateVote",
-            arguments => { change => $change->id }
+            arguments => { change_id => $change->id }
         );
 
         if ($valid_tags->count == 0) {
@@ -144,7 +144,7 @@ sub show_vote_form {
             );
         }
         else {
-            render_action $vote, ['change'];
+            render_action $vote, ['change_id'];
             while (my $valid_tag = $valid_tags->next) {
                 form_submit(
                     label => $valid_tag->text,

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



More information about the Bps-public-commit mailing list