jchahn
April 26th, 2006, 07:01 PM
At work everything we do is based on Java and Javascript. I am the guinea pig that they decided should try to make some apps using RoR, should Ruby and/or RoR turn out to be a beneficial tool for us, we will make more and more things with it. Like I said, I am the guinea pig.
Anyway, my project is to make a web app that is basically just a simple drop down menu that lists the names of all the tables in a particular database, then when the user clicks on one of the tables, then hits "submit" it will show them a nice neat .html table of all the data in that table. I have already made the list.rhtml file that shows all the data in a nice neat table. What I need now is to start on the drop down menu. I could easily make the drop down menu and hard code the names of all the tables into it, but the kicker is that we need it to be dynamically updatable. Meaning that if someone comes along and adds another table to the database, or removes one, the drop down menu is automatically updated to reflect this change and of course if you click on it and hit submit, it will show you all the data.
So, forgive my ignorance, I'm new when it comes to Ruby and RoR, but is there a way to, for lack of a better term, "sync" RoR with a database so that it can automatically be updated when tables are added or removed, or can you only "sync" it with the individual tables. Sorry for the bad terminology, I hope you can understand what I am trying to do and what my question is.
Thanks in advance.
Anyway, my project is to make a web app that is basically just a simple drop down menu that lists the names of all the tables in a particular database, then when the user clicks on one of the tables, then hits "submit" it will show them a nice neat .html table of all the data in that table. I have already made the list.rhtml file that shows all the data in a nice neat table. What I need now is to start on the drop down menu. I could easily make the drop down menu and hard code the names of all the tables into it, but the kicker is that we need it to be dynamically updatable. Meaning that if someone comes along and adds another table to the database, or removes one, the drop down menu is automatically updated to reflect this change and of course if you click on it and hit submit, it will show you all the data.
So, forgive my ignorance, I'm new when it comes to Ruby and RoR, but is there a way to, for lack of a better term, "sync" RoR with a database so that it can automatically be updated when tables are added or removed, or can you only "sync" it with the individual tables. Sorry for the bad terminology, I hope you can understand what I am trying to do and what my question is.
Thanks in advance.