With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called in a controller.
$this-find() works perfectly find, and I'm trying to replace $this-
find( 'all', $conditions );
(Sorry I meant from my Controllers to my Models!)
On 14 July, 12:12, Shaz shazam...@gmail.com wrote:
With my current craze of moving all logic from my models to my
controllers, a slight problem has risen - namely I can't seem to use
$this-paginate() in a Model function thats called in a
It makes no sense for paginate to be called as-is in a model.
The `paginate` method is part of the controller, because it relies on
URL settings (which page, sort order, etc) which only the controller
can access. Allowing the model to access these parameters directly
would violate MVC - in a bad