[Rails] Re: Modelling Foreign Keys

Arch Stanton d6veteran at gmail.com
Sun Apr 2 15:49:40 GMT 2006


Ray Baxter wrote:
> Arch Stanton wrote:
> 
>> So you mean in the TestTypeController I need to define @test_types?
> 
> Yes. There won't be anything in the drop down until you create some
> test_types though.
> 
> 
> --
> 
> Ray

That doesn't make any sense to me.  I look through the rest of my 
controllers and I can access the entire model without anything more than 
a scaffold declaration.

I understand that I should define test_type in my Type controller, as I 
have done here:

class Admin::TestController < Admin::BaseController
    scaffold :test
    def new
        @test = Test.new
        @test_type = TestType.find(:all)
    end
end
---------------------
class Admin::TestTypeController < Admin::BaseController
    scaffold :test_type

end

Not sure why this is not working.


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


More information about the Rails mailing list