I'm looking at the best way to manage a dynamic models in rails from a web interface; for example lets say i have a product model and from the admin web interface I want to be able to add a new field/column with the related data type (e.g. a new field "description" of type string). I've though of two possible ways:
Create migration file from the web interface:
rails generate migration table field:type
rake db:migrate
Implement the definition of the model in the database itself.
This last solution seems like reinventing the wheel and more cumbersome to maintain but I couldn't come up with a better solution, what would you recommend?
I've came across this solution although my concern is too keep things simple and standard.
Any suggestions would be great, thanks!!