Steve Ross
2006-Feb-24 20:04 UTC
[Rails] Unable to automatically link controller and model?
This is the first time I''ve seen this. I''m running Rails 1.0 on lighttpd (Mac OS/X) and all my other Rails apps are working just fine. I did: script/generate controller Menu script/generate model Menu added a little code (like scaffold :menu) and got: undefined method `find'' for Menu:Dependencies::LoadingModule Adding model :menu solves the problem. Anyone know why my Menu model isn''t being loaded? TIA -- Posted via http://www.ruby-forum.com/.
Mikkel Bruun
2006-Feb-24 20:18 UTC
[Rails] Unable to automatically link controller and model?
To many menus??? Whats the name of the generated classes??? :model has been deprecated since....0.7 or so... On Friday, February 24, 2006, at 9:04 PM, Steve Ross wrote:>This is the first time I''ve seen this. I''m running Rails 1.0 on lighttpd >(Mac OS/X) and all my other Rails apps are working just fine. > >I did: > >script/generate controller Menu >script/generate model Menu > >added a little code (like scaffold :menu) > >and got: > >undefined method `find'' for Menu:Dependencies::LoadingModule > >Adding > >model :menu > >solves the problem. Anyone know why my Menu model isn''t being loaded? > >TIA > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsMikkel Bruun www.strongside.dk - Football Portal(DK) nflfeed.helenius.org - Football News(DK) ting.minline.dk - Buy Old Stuff!(DK) -- Posted with http://DevLists.com. Sign up and save your time!
Steve Ross
2006-Feb-24 20:28 UTC
[Rails] Re: Unable to automatically link controller and model?
There is exactly one menu. I''ve tried it with zero. Using :model was a hack of expediency so I could move ahead and fix when I figured it out :) It appears the problem has less to do with the amount of data than with the fact that the model class is not being loaded unless I explicitly tell Rails I want it. Thx Mikkel Bruun wrote:> To many menus??? > > Whats the name of the generated classes??? > > :model has been deprecated since....0.7 or so... > > On Friday, February 24, 2006, at 9:04 PM, Steve Ross wrote: >>and got: >> >>-- >>Posted via http://www.ruby-forum.com/. >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > > > Mikkel Bruun > > www.strongside.dk - Football Portal(DK) > nflfeed.helenius.org - Football News(DK) > ting.minline.dk - Buy Old Stuff!(DK)-- Posted via http://www.ruby-forum.com/.