]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/Base.pm
Distinguish between all columns, and the ones you want to display, in
[maypole.git] / lib / Maypole / Model / Base.pm
index c4c959f7c7c42a4c2b0b0ec933bc56242120b83b..12bb71d24e614cd0e66d87043c2bc6b4108fcbfb 100644 (file)
@@ -13,6 +13,10 @@ sub process {
     $class->$method($r);
 }
 
+sub display_columns { 
+    sort shift->columns;
+}
+
 =head1 NAME
 
 Maypole::Model::Base - Base class for model classes
@@ -70,7 +74,9 @@ beers, so C<BeerDB::Brewery> needs to return C<beers>.
 
 =head2 columns
 
-This is a list of the columns in a table.
+This is a list of all the columns in a table. You may also override
+C<display_columns>, which is the list of columns you want to view, in
+the right order.
 
 =head2 table