Why not just make the model?
<?php class Contact extends AppModel {
public $name = 'Contact';
public $useTable = null; //no db table required
}
?>
Problem solved :)
K
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Estevam
Sent: Monday, February 14, 2011 11:00 PM
To: CakePHP
Subject: Model and Controllers
I have an contact_controller to send emails, so i dont need a model to
this controller.
But, at the same time, i set $uses = array(' ModelName') in
AppController because i execute a method on beforeRender() that uses
this model. And i need this in all controllers.
The problem is that if i dont have a model to contact_controller, it
says that is missing a model. But if i set $uses to null on my contact
controller the method i call inside beforeRender, that depends of the
model, returns an error.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php