Helpful Information
 
 
Category: Ruby & Ruby On Rails
question regarding databases and RoR

Is it possible to allow users to dynamically select the number of columns in a database, and also choose the names? (example user is given choice of a number between 3 and 5 for the number of columns, then asked to name the columns) If so, how would this be done?

If you REALLY need to do this you would write your own sql queries to create the tables with the desired field names, there is nothing built into rails to do this for you.

I would suggest however you look at your database design instead as there are very few situations that require dynamic table creation.










privacy (GDPR)