[Catalyst] Shortcut to Model ?
Alex Kavanagh
alex at tinwood.homelinux.org
Mon Jan 23 19:25:08 CET 2006
At Mon, 23 Jan 2006 22:12:19 +0200,
raptor wrote:
>
> hi,
>
> Is there a shortcut to :
> Application::Model::CDBI::Table->method()
>
> f.e. something like this :
>
> $c->model->method()
>
> or some such ? If it works then what if we have many models ??
There appears to be a model method on the context object:
$c->model('<<Classname>>')->method(args);
Where <<Classname>> is the subclass in the Model subdirectory of the
application.
Cheers
Alex.
More information about the Catalyst
mailing list