Help with My_Model and extending it? |
Hi,
Been playing around with Jamie rumbelow's My_Model and find it really useful so far. Just working with the 'observers' before_create and before_update. I've only been testing these observers with one model so far. In that model I've got the following code: PHP Code: public $before_update = array( 'timestamps_for_update' ); Now, if I want to extend this functionality to all models in my app I don't want to write this code in every one ... so what's the best way tp proceed with this - use a 'Base' model to extend MY_Model and put the code in there and then extend all models from that? Or is there another, better way? |
Messages In This Thread |
Help with My_Model and extending it? - by blackbulldog - 04-22-2015, 05:18 AM
RE: Help with My_Model and extending it? - by Avenirer - 04-22-2015, 11:28 PM
RE: Help with My_Model and extending it? - by blackbulldog - 04-23-2015, 03:49 AM
RE: Help with My_Model and extending it? - by Avenirer - 04-23-2015, 03:54 AM
RE: Help with My_Model and extending it? - by blackbulldog - 04-23-2015, 04:33 AM
RE: Help with My_Model and extending it? - by Avenirer - 04-23-2015, 04:50 AM
RE: Help with My_Model and extending it? - by blackbulldog - 04-23-2015, 04:52 AM
RE: Help with My_Model and extending it? - by mwhitney - 04-23-2015, 01:47 PM
|