[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-08-29 Thread Al Rushing
Just another quick solution. You can generate the Ruby scaffolding commands using SQL out of the database. Just access sys.columns or whatever your particular database provides (INFORMATION_SCHEMA or something). For each column, generate that line that Ruby wants for a column / table entry.

[Rails] Re: Scaffolding for pre-existing database table in 2.0.1

2014-08-29 Thread Al Rushing
Sebastian wrote in post #599469: > Hi, > > first of all I will apologize in advance for my presumably noobish > question, but I'm only starting to learn Rails and am a little > confused with all the changes in 2.0.1. There are as good as no > tutorials out yet and the 2 or 3 screencasts I've seen d

[Rails] Using scaffolding with Ruby 4.1.0 on existing Db

2014-08-20 Thread Al Rushing
Thanks in advance for the great responses on this forum. My question is this: Let's say I have a MySQL database with three tables. Referential integrity is set up in the database, so invalid keys will cause a non zero query return code. The tables are: Category which o