I have model Car and fields vin:uniq a_field1 a_field2 a_field3 .. a_field20 b_field1 b_field2 b_field3 .. b_field30. I have two kinds of users Mechanik and Manager. Mechanik can see and edit a_ parameters and manager is able to see and edit b_ parameters. Nobody can edit vin. Both of users can create Car with vin and a_ parameters for Mechanik and vin and b_ parameters for manager. Is it better to divide the model car and connect them by has_one and belongs_to or have one big model with all parameters. Maybe there is another better approach? How it should looks like?
Aucun commentaire:
Enregistrer un commentaire