I just thought I'd share an epiphany in case any other lunkheads were under the same misconception I was.

I had been avoiding chained actions for months b/c I was under the impression they were synonymous with code namespaces. Today, I realized they aren't.

So, I was doing things like:
 /post/[id]
 /admin/post/[id]

With plenty of duplicated code between them because I thought the admin paths had to be under Admin::auto to do blanket security stuff and I didn't want to seed security checks everywhere b/c I know I'd miss something.

I realize now I can do
 /post/[id]
 /post/[id]/edit
 /post/[id]/private_notes # whatever

And put the edit code into Admin::Post::edit and just chain it back to the public Post view.

Like built-in information architecture. Thanks again to all the Cat developers. SO NICE.


–Ashley
--



_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to