Hey,

I'm pretty sure I have set up everything correctly, but this is not
working out to well for me.  The logable Behavior never gets
called...  I must say I have never worked with behaviors before and
these next few lines may sounds very "noobish" this is how I set it
up:

-------------------------------
in each model needed I have added :

var $actsAs = array("Logable");

-------------------------------
added the Behavior code in:

app->models->behaviors->Logable.php

-------------------------------
added this to the app_controller->beforeFilter:

if (sizeof($this->uses) && $this->{$this->modelClass}->Behaviors-
>attached('Logable')) {
    $this->{$this->modelClass}->setUserData($this->activeUser);
}

-------------------------------
created my logs table:

CREATE TABLE `logs`
(
`id` bigint(10),
`title` varchar(255),
`created` datetime,
`description` varchar(255),
`model` varchar(255),
`action` varchar(255),
`change` varchar(255)
);

----------------------------
and finally created a log model (log.php):

<?php
class Log extends AppModel {

        var $order = 'Log.created DESC';

}
?>

Could anyone tell me what am I doing wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to