[Rails] Re: Modelling Foreign Keys

Arch Stanton d6veteran at gmail.com
Sun Apr 2 05:33:58 GMT 2006


Ray Baxter wrote:
> 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

I thought I was using the scaffolding.

So you mean in the TestTypeController I need to define @test_types?


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


More information about the Rails mailing list