[Catalyst-commits] r8032 - trunk/CatalystX-Imports/lib/CatalystX
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sat Jun 28 15:15:55 BST 2008
Author: rafl
Date: 2008-06-28 15:15:55 +0100 (Sat, 28 Jun 2008)
New Revision: 8032
Modified:
trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
Log:
Add flash example to synopsis.
Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports.pm 2008-06-28 14:15:48 UTC (rev 8031)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports.pm 2008-06-28 14:15:55 UTC (rev 8032)
@@ -37,7 +37,8 @@
Context => { Default => [qw( :all )],
Config => [{model => 'model_name'}, 'template'] },
Vars => { Stash => [qw( $user $user_rs $template )],
- Session => [qw( @shown_users )] };
+ Session => [qw( @shown_users )],
+ Flash => [qw( $message )] };
sub list: Chained {
$user_rs = model(model_name)->search_rs;
@@ -52,6 +53,13 @@
$template = template;
}
+ sub edit: Chained('load') {
+ if (validate_params(request->params)) {
+ $user->update(request->params);
+ $message = "user updated";
+ }
+ }
+
1;
=head1 DESCRIPTION
More information about the Catalyst-commits
mailing list