X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FBase.pm;h=dc715a0bdaeeeddcb8499f557470eca633f2c71c;hb=bec4a6ff4a3503a297ce1226f9bbd46341193616;hp=30dacfe60015ad8227a4370fb1d5dff180c38242;hpb=43c803ceb66d273f53b343229ed1ebd6eb0fc142;p=maypole.git diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index 30dacfe..dc715a0 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -12,6 +12,7 @@ sub process { return if $r->{template}; # Authentication has set this, we're done. $r->{template} = $method; + $r->objects([]); my $obj = $class->retrieve( $r->{args}->[0] ); if ($obj) { $r->objects([ $obj ]); @@ -124,7 +125,7 @@ Return a hash mapping column names with human-readable equivalents. sub column_names { my $class = shift; map { my $col = $_; - $col =~ s/_+(\w)?/ \U\1/g; + $col =~ s/_+(\w)?/ \U$1/g; $_ => ucfirst $col } $class->columns } =head2 description