2 use base qw/Maypole::Model::CDBI/;
6 # Overide list to add display_columns to cgi
7 # Perhaps do this in AsForm?
12 $self->SUPER::list($r);
13 my %cols = map { $_ => 1 } $self->columns, $self->display_columns;
14 my @cols = keys %cols;
15 $r->template_args->{classmetadata}{cgi} = { $self->to_cgi(@cols) };
19 # Template switcheroo bug bit me -- was seeing view page but the view action was never
20 # being executed after an edit.
21 sub do_edit : Exported {
22 my ($self, $r) = (shift, shift);
23 $self->SUPER::do_edit($r, @_);
24 if (my $obj = $r->object) {
25 my $url = $r->config->uri_base . "/" . $r->table . "/view/" . $obj->id;
26 $r->redirect_request(url => $url);
30 sub metadata: Exported {}