On Wed, Oct 28, 2009 at 06:57:25AM +0100, Zbigniew Lukasiak wrote: > On Wed, Oct 28, 2009 at 6:07 AM, Jason Dixon <[email protected]> wrote: > > Hi all, > > > > Learning Catalyst here. ??Following along with the manual and I ran into > > a weird issue. ??I assume the documentation is right so it must be > > something with my installation (Catalyst packages on OpenBSD 4.6). > > > > Following along with the "SIMPLE DELETE FEATURE" example, I made changes > > to root/src/books/list.tt2. ??Alas, the uri is not rendering properly. > > > > <a href="[% c.uri_for(c.controller.action_for('delete'), [book.id]) > > %]">Delete</a> > > I may have not updated my view knowledge - but I would write that as: > <a href="[% c.uri_for(c.controller.action_for('delete'), book.id) > %]">Delete</a> > > Why did you use the square brackets around 'book.id'?
That's straight out of the example. http://search.cpan.org/~hkclark/Catalyst-Manual-5.8001/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod#___top If I remove the square brackets it no longer links as ARRAY (I should have mentioned this before), but the action_for() returns empty. So a link now appears as: http://localhost:3000/books/8 Which of course renders a "Page not found" error. Thanks, -- Jason Dixon DixonGroup Consulting http://www.dixongroup.net/ _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
