diff options
author | rafl <rafl@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-18 13:22:02 +0000 |
---|---|---|
committer | rafl <rafl@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-18 13:22:02 +0000 |
commit | 5a333e302b238e667f1e454172c7eedbcb483fad (patch) | |
tree | b8bd65aa5ac5d24023bc16db303438268266539d /lib/Reaction/Manual | |
parent | 2b14a13672d8b2f1707fc7225039e75c6d103f8d (diff) | |
download | reaction-5a333e302b238e667f1e454172c7eedbcb483fad.tar.gz reaction-5a333e302b238e667f1e454172c7eedbcb483fad.zip |
Add a chain root to the intro docs.
Diffstat (limited to 'lib/Reaction/Manual')
-rw-r--r-- | lib/Reaction/Manual/Intro.pod | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Reaction/Manual/Intro.pod b/lib/Reaction/Manual/Intro.pod index 2e60672..b761012 100644 --- a/lib/Reaction/Manual/Intro.pod +++ b/lib/Reaction/Manual/Intro.pod @@ -135,6 +135,11 @@ C<Reaction::UI::Controller::Root>. namespace => '' ); + sub base : Chained('/') PathPart('') CaptureArgs(0) { + # do some setup for every request + # also provides a chain root for other controllers to use + } + 1; =head3 Individual controllers @@ -149,7 +154,10 @@ For each Collection(table?) in your DB, you need to create a controller __PACKAGE__->config( model_name => 'IM', # This corresponds to the name of the MyApp::Model you created earlier collection_name => 'Foo', # Name of one of the sources in your InterfaceModel - action => { base => { Chained => '/base', PathPart => 'foo' } }, + action => { + base => { Chained => '/base', # chain to the base action in the root controller + PathPart => 'foo' }, + }, ); 1; |