Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2005
    Location
    Steger, IL
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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?
    Jim

  • #2
    New Coder
    Join Date
    May 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Flexible UK web hosting solutions for designers and developers
    PHP5, Ruby on Rails, MySQL, spam and virus filtering
    UK Hosting from Media72, Media72 on twitter


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •