[Rails] Re: Modelling Foreign Keys

Ray Baxter ray at warmroom.com
Sun Apr 2 05:28:49 GMT 2006


d6veteran wrote:
> I'm really having a hard time implementing foreign keys and I find it
> odd that Rails makes so many things easy, yet foreign keys don't seem to
> be supported.  Maybe I am missing something.  Here's the revelant set up
> info:

You could use the scaffolding to build a working example of the logic here.

Your problem on line 19, is that you have a variable @test_types, which 
you didn't define in your controller. The 
options_from_collection_for_select calls inject on this nil object and 
you get this error.

-- 

Ray




More information about the Rails mailing list