Scaffold leaving out column names ending in _id?

I’ve been trying to get scaffold to display all fields in a simple
table.
I noticed that if a column name ends in ‘_id’ the scaffold ignores it,
also the scaffold does not display the primary key, named ‘id’.
Where can I find a list of the rules that the scaffold follows?
If they are simply the rails rules, please provide that link.

Thanks!

Hi,

I think the scaffold uses (or at least used to use) this function to
create the list of fields:

Allan

Allan wrote:

Hi,

I think the scaffold uses (or at least used to use) this function to
create the list of fields:

http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001033

Allan

in your database design, under ROR, the foreign key is _id,
and is ignored in scaffolding … but you can add it by hand. easy to
do.

if i got this wrong, fred made me do it.

It’s pretty pointless for scaffolding to include these anyway. You’re
going
to have the id in the URL (for edit pages), you’re going to need to
build a
picklist for your _id fields because Rails, when you scaffold, can’t
know
what you’re trying to do.

Scaffolding is a learning tool. It was not, and never will be, intended
for
actual use in a production application.

Other projects, like ActiveScaffold and Streamlined, do offer very
robust
automatic interface builders.