On Fri, Sep 4, 2009 at 10:14 AM, Marcelo Andrade<[email protected]> wrote: > > On Fri, Sep 4, 2009 at 11:09 AM, Xanax<[email protected]> wrote: >> >> Is it possible to create a "beforesave" method for all the models ? >> I mean in a file like app_controller which controll all the controllers > > Yes. You can create an app_model.php with an AppModel > class extending Model in you /app folder and overwrite the > beforeSave method there. All of your models will use it. >
You can copy cake/libs/model/app_model.php to your app directory and modify that. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
