Topic: model extend model

i'm trying to extend model from model. i defined A model set fields. then i create B model and extend A model . because i wanna work with A model's some fields. is it possible sorry my english skill

Re: model extend model

Do you mean you want model B to contain all the aspects of model a but then add more attributes modules etc...?

If so you want model b t inherit from model a.

My guess would be that instead of model B inheriting from ActiveREcord:Base on line one change it to Model A and it will also get the base from the model A inheritance plus everything you've written in model A.

I have no idea if you can generate a model with different inheritance, but you can manually change the model file

Re: model extend model

oK. i mean A model contain all fields and inherit from ActiveRecord:Base. B model inherit from A . also B model override some fields of A.