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!
on 2006-03-31 10:58
on 2006-03-31 11:06
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
on 2006-03-31 11:17
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.
on 2006-03-31 11:22
You really should check the documentation before asking this list. http://api.rubyonrails.org/classes/ActiveRecord/As... 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@example.com >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)