I'm developing an application where I should save information for a model. Specifically I have an Answer model that store the value of an input for a question. However, some questions accepts multiple answers (checkboxes), so I have to have conditionals to process this array in a different way of a single input. I want to know if there is pattern (maybe Strategy pattern?) to store this data depends of the type of question in the same model (Answer model). Thanks for all.
Aucun commentaire:
Enregistrer un commentaire