On Mar 1, 2:49 am, Samuel DeVore [EMAIL PROTECTED] wrote:
requestAction is a method of Controller not Model
Well.. actually it's a method of object. The error is caused by doing
$this-SomethingThatDoesn'tExist-method();
However the question as raised looks like the controller logic in
On 3/1/07, AD7six [EMAIL PROTECTED] wrote:
On Mar 1, 2:49 am, Samuel DeVore [EMAIL PROTECTED] wrote:
requestAction is a method of Controller not Model
Well.. actually it's a method of object. The error is caused by doing
$this-SomethingThatDoesn'tExist-method();
And the funny thing is I
OK.
So this: var $uses = array('Category'); is the key here. Because I am
doing a beforeFilter(), my model wasn't loaded yet.?
On Mar 1, 8:58 am, Samuel DeVore [EMAIL PROTECTED] wrote:
On 3/1/07, AD7six [EMAIL PROTECTED] wrote:
On Mar 1, 2:49 am, Samuel DeVore [EMAIL PROTECTED] wrote:
On Mar 1, 4:02 pm, phirschybar [EMAIL PROTECTED] wrote:
OK.
So this: var $uses = array('Category'); is the key here. Because I am
doing a beforeFilter(), my model wasn't loaded yet.?
It isn't important with regards to your problem whether you use
beforeFilter or beforeRender. However,
Models are instantiated before running beforeFilter(). You can see this by
looking at dispatch() in class Dispatcher, located at cake/dispatcher.php:
1. Creates the controller: $controller = new $ctrlClass();
2. Initializes components: $controller-_initComponents()
3. Initializes models in the
AD7 and Mariano, thanks. Yeah I'll be digging through the source
before long ;)
On Mar 1, 11:12 am, Mariano Iglesias [EMAIL PROTECTED]
wrote:
Models are instantiated before running beforeFilter(). You can see this by
looking at dispatch() in class Dispatcher, located at cake/dispatcher.php:
I am trying to make it so that some data to an element is present on
EVERY page on my entire app. So, to do this I made an
app_controller.php in /app and I have the following:
class AppController extends Controller {
function beforeFilter() { // grab all of the categories.
requestAction is a method of Controller not Model
try
$this-requestAction(...
see http://api.cakephp.org/class_object.html#c40a38b60a3748b9cf75215b92ee3db1
and http://manual.cakephp.org/chapter/controllers
On 2/28/07, phirschybar [EMAIL PROTECTED] wrote:
I am trying to make it so that some
ahh. Thanks for the info.. makes sense.
On Feb 28, 8:49 pm, Samuel DeVore [EMAIL PROTECTED] wrote:
requestAction is a method of Controller not Model
try
$this-requestAction(...
seehttp://api.cakephp.org/class_object.html#c40a38b60a3748b9cf75215b92ee...