Hi Matt,

On 7/3/06, Matt S Trout <[EMAIL PROTECTED]> wrote:
> I tend to just modify the relevant ACCEPT_CONTEXT to return a resultset that
> already has (e.g.) "WHERE order.user_id = $current_uid" applied to it, at
> which point I can just do $c->model('DBIC::Orders') in my controller code and
> it Does The Right Thing.

I understand what your saying here, but can't figure out how to
implement it or how it's useful.  I've read the docs about
ACCEPT_CONTEXT in Catalyst::Manual::Intro and Catalyst::Component, but
don't understand how this makes getting to that information easier.

It doesn't seem that hard to say:

$c->model('DBIC::Orders')->search({ user_id => $current_uid || $c->user->id });

If the ACCEPT_CONTEXT is a cool new way to handle (what seem to me as)
global variables, I'd love to use it, but wonder if you could give a
small example.

Thanks,
Kevin
-- 
Kevin Old
[EMAIL PROTECTED]

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to