ID fields not getting picked up

For example I have table Questions. With fields id, text, and test_id.

test_id is not being displayed in my view. I am hoping this means Rails
has picked up that it is an id for another model. If so, then how do I
utilize that?

If not, then do I need to avoid ‘id’ in any field names other than the
main id field?

Thanks!

unknown wrote:

It’ll be because fields named xxx_id are supposed to be foreign
fields. You have to customise stuff to make that show up how you
want… scaffold won’t do it.
-Nathan

Yes they are foreign keys. Can anyone point me to some examples of how
to link up those realtionships in Rails?

thanks.

You really should check the documentation before asking this list.

http://api.rubyonrails.org/classes/ActiveRecord/Associations/
ClassMethods.html

On Friday, March 31, 2006, at 9:17 AM, Arch S. wrote:


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk - Buy Old Stuff!(DK)

It’ll be because fields named xxx_id are supposed to be foreign
fields. You have to customise stuff to make that show up how you
want… scaffold won’t do it.
-Nathan