Forum: Ruby on Rails Unable to automatically link controller and model?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2006-02-24 21:04
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
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Mikkel Bruun (Guest)
on 2006-02-24 21:21
(Received via mailing list)
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)
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2006-02-24 21:27
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)
This topic is locked and can not be replied to.