My controllers need to create more than one model. I could use nested attributes to whitelist the params. However I would have strong params for the same models all over the place and whenever I changed one of the models I would have to change all the strong params.
To solve this, I found this idea of creating a module with the strong params and call them in the controllers. I am new to rails, so I would like to know if this is a good or bad pattern/idea??
Aucun commentaire:
Enregistrer un commentaire