Hello, I have some columns in a table that are foreign keys (in PostgreSQL 8.0) that must not be null. I generated scaffolding using ''ruby script/generate scaffold [name]'' and everything seems to be working normally, except that the scaffolding does not include any way to set the foreign keys if I try to add a new row. A quick google suggests that this is normal behavior, but I was curious why? Thanks In Advance. -- Tabor Kelly tkelly-rails-15BJK4dlZCtAtc6zTKlAYNHuzzzSOjJt@public.gmane.org http://tabor.taborandtashell.net
Tabor Kelly wrote:> I have some columns in a table that are foreign keys (in PostgreSQL 8.0) > that must not be null. I generated scaffolding using ''ruby > script/generate scaffold [name]'' and everything seems to be working > normally, except that the scaffolding does not include any way to set > the foreign keys if I try to add a new row. A quick google suggests that > this is normal behavior, but I was curious why?Because it hasn''t been implemented. Scaffolding is there so you can hit the ground running; it is not an app-in-a-box. That said, I''d love to see robust code generation for associations. Dmitry Sabanin began work on this but I''m unsure of its status. jeremy
Jeremy Kemper wrote:> Tabor Kelly wrote: > >>I have some columns in a table that are foreign keys (in PostgreSQL 8.0) >>that must not be null. I generated scaffolding using ''ruby >>script/generate scaffold [name]'' and everything seems to be working >>normally, except that the scaffolding does not include any way to set >>the foreign keys if I try to add a new row. A quick google suggests that >>this is normal behavior, but I was curious why? > > > Because it hasn''t been implemented. Scaffolding is there so you can hit > the ground running; it is not an app-in-a-box. That said, I''d love to > see robust code generation for associations. Dmitry Sabanin began work > on this but I''m unsure of its status. > > jeremyFair enough, I was just surprised that I couldn''t manually enter and integer for their value. -- Tabor Kelly tkelly-rails-15BJK4dlZCtAtc6zTKlAYNHuzzzSOjJt@public.gmane.org http://tabor.taborandtashell.net