On Wed, 2006-07-19 at 18:11 +0200, none wrote:
it’s me again,
i found that it doesn’t change a thing if i run my rails app in
production mode on a webrick-server on my home-machine (suse 10.1). so
it’s NOT a mongrel/lighttpd related problem!
seems like there a re problems with my models being nested in a
subfolder. for example:
BOOM! Models in modules DO NOT WORK. I wasted about 3 weeks struggling
with this on one team and it turned out nothing about it works. Putting
controllers in modules is no problem, but Models just fails miserably
I’ve been rounds with rails-core over this misfeature, and the only
response is that I’m a jerk so don’t expect it to improve soon.
Apart from the above naming and loading errors, there’s also a logical
error in how they’re implemented where if you have Downloads::Download
then the table should match with downloads_downloads, other wise you
have clashes when you have FooBar::Download in another module since they
both use “downloads” as the table. You also have problems loading
fixtures, naming fixtures, accessing two models with the same name, and
many other problems.
In other words, give up your foolish notion of putting everything in a
module just like Java and embrace that you’ll have a monster model in
the root namespace. You’ll be much happier.
Zed A. Shaw
http://www.railsmachine.com/ – Need Mongrel support?