Forum: Ruby on Rails Automatically mapping content_columns?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Daniel B. (Guest)
on 2006-01-03 23:19
(Received via mailing list)
Hi all,

Quick setup - I've got a table Foo.  Foo has a foreign key (bar_id) to
table Bar.  The Bar table has an "id" and "name" column.  Assume a 1:1

The issue I'm trying to resolve (or rather, be lazy about) is with
regards to
Foo.content_columns.  By default it doesn't pickup the foreign key. What
wondering is if there's a convenient way to have content_columns
pick up both the column name and value that I'm after in the parent
table.  Or
is that just something I have to work out manually in the view or
or by redefining content_columns?

I don't want to just use Foo.columns, because that will give two values
I don't
want - the "bar_id" column name and the corresponding integer, neither
of which
I want displayed in a view.

If this is all covered by the content_columns documentation somewhere,
point me to it (I didn't see anything in the Agile book).


This topic is locked and can not be replied to.