Take the 2-minute tour ×  I've created a simple method in mo
controller, like so:  public function getAddresses() {
$addresses = $this->Adres->find('all');     return $addresses;
When I call this in a controller, like so:      $sponsors =
$this->Adres->getAddresses();  I get this strange error:
Database Error   SQL Query: getAddresses  What did I do wrong?
share|improve this question add comment  1 Answer  That's
because here you are calling the method on the model   When you
clearly stated in your first sentence that the method is on the
controller. Move the method to the Adres model and you should be
good!  share|improve this answer Thanks, you've helped me a lot!
–  matheusvmbruno Jul 25 '13 at 0:37 add comment  Your Answer