On 29.9.2005, at 20.55, Ed Howland wrote:
> Hi,
>
> I have a number of tables that are linked via foriegn keys. When I
> added the belongs_to relationship to the tables, and re-ran the
> scaffold generator, there was no link that showed up in the list or
> edit view.
>
> I looked at the code it generated and it defaults to displaying
> MyModel.content_columns which exclude any with ''_id'' for
FKs. I had
> thought it would throw in a link to another scaffold generated viewer
> or something. Of course, I can edit this by hand and put in the right
> name/description value from the linked table.
>
> What I''d like to know is are there going to be any automated steps
for
> this in future generators. Should I edit the code for the generator to
> "do the right thing?"
Ed,
Scaffolding doesn''t currently support associated objects. It is not
entirely trivial to add such support and so far no one has felt the
pain to implement it. After all, scaffold is just... you know...
scaffold. But if you feel such a system would be worth the effort,
feel free to implement it and submit a patch.
//jarkko
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails