Changeset 4 for trunk/Vote
- Timestamp:
- 03/05/09 23:03:16 (15 years ago)
- Location:
- trunk/Vote
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Vote/lib/Vote/Controller/Ballot.pm
r3 r4 22 22 =cut 23 23 24 sub index: Private {25 my ( $self, $c ) = @_;24 sub default : Private { 25 my ( $self, $c, undef, $id ) = @_; 26 26 27 $c-> response->body('Matched Vote::Controller::Ballot in Ballot.');27 $c->stash->{voteid} = $id; 28 28 } 29 29 -
trunk/Vote/lib/Vote/Model/Vote.pm
r3 r4 110 110 } 111 111 112 sub vote_choices { 113 my ($self, $id) = @_; 114 115 my $sth = $self->db->prepare_cached( 116 q{ 117 select * from choice where poll = ? 118 order by label 119 } 120 ); 121 $sth->execute($id); 122 my @ch; 123 while (my $res = $sth->fetchrow_hashref) { 124 push(@ch, $res); 125 } 126 @ch 127 } 128 112 129 =head1 AUTHOR 113 130
Note: See TracChangeset
for help on using the changeset viewer.