Thanks for replying, this information might come in handy later. I just noticed that I have a typo in my title. It's supposed to be 'help in dry'ing controllers'
On Mar 5, 1:08 am, majna <majna...@gmail.com> wrote: > CommonController extends AppController > all common methods here... > (remeber to set parent::beforefilter() etc. if there is controller > callabacks) > > App:import('Controller', 'Common'); > PostController extends CommonController > > On Mar 4, 3:16 pm, ramonmaruko <ramonmar...@gmail.com> wrote: > > > > > > > I have three controllers that have the same code for the index/add/ > > edit/delete/view actions. How should I refactor the code so that it'll > > be in just one place, and those three controllers would just inherit > > the actions from somewhere? Currently, I have the actions defined > > inside my AppController class. Each action checks to see if the > > controller that called the action is one the three controllers > > 'expected' to inherit them. Is there a better way of doing this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---