Something wrong with content_columns

I have a database with a couple of tables. One table called spares has
foreign keys in another called equipment. When I create a new record,
it is added to the spares table however the list action does not show
all the columns in the table. It only shows those columns that are not
foreign keys. I am using the default action generated by scaffold for

Why is that so? Do i need to re-write my own code for the view?

Thanks in advance


nothing wrong -


Returns an array of column objects where the primary id, all columns
in “_id” or “_count”, and columns used for single table inheritance have
been removed.

Oh… so how do I get to display them?

Where can I find a reference to this behaviour so that I dont ask
stupid questions before checking in the right places?



On 3/22/06, Emin H. [email protected] wrote:

Rails mailing list
[email protected]


The api is a great resource for functions.

If you’re using edge rails, you can build the latest documentation on
local machine so you’ve got the latest documentation to go with the

rake doc:rails
It will put the docs in your /doc folder. If you’re using subversion,
might want to ignore that folder and its contents.

To answer your questions, there’s a function in ActiveRecord called
columns() that returns the columns including the _id fields.

– Wes

On 3/22/06, Dattatraya G. [email protected] wrote:

On 3/22/06, Emin H. [email protected] wrote:

Why is that so? Do i need to re-write my own code for the view?
[email protected]

-- Wes