Permalink
Browse files

update template

  • Loading branch information...
1 parent de82c77 commit d94e98b5292a284397f3e2fc257804748eda6d1c @three18ti committed Jun 19, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/My/Controller/Admin.pm
  2. +2 −1 root/src/admin.tt
@@ -25,7 +25,7 @@ sub index :Path :Args(0) {
my ( $self, $c ) = @_;
$c->stash(
- users => [$c->model('DB::User')->search_rs],
+ users => $c->model('DB')->resultset('User')->search_rs,
template => 'admin.tt',
);
}
View
@@ -11,7 +11,8 @@
<td>[% user.username %]</td>
<td>[% user.name %]</td>
<td>[% user.email %]</td>
- <td>[% WHILE (role = user.roles.all) -%][% role %], [% END %]</td>
+ [%- roles = user.roles.serch_rs() -%]
+ <td>[%- WHILE (role = roles.next) -%][% role %], [% END %]</td>
</tr>
[% END -%]
</table>

0 comments on commit d94e98b

Please sign in to comment.