So I'm upgrading my app from Rails 1.2.6 to Rails 2.1.2.
I have a complex find statement that worked in 1.2.6 and isn't working
in 2.1.2. I think maybe this is a bug, although maybe there's something
else I could be doing to work-around it?
My find statement involves:
* Models in a module for namespace purposes
* a join clause with raw SQL
* an includes clause with multiple levels (the hash syntax)
We have encountered similar issues. We finally decided not rely on Rails
finding any classes declared in a module namespace. We liked the
organization that the module namespace provided as our models directory
was getting pretty large. So we kept our file structure as is, but
removed the namespace. Instead, we explicity "require" the classes in
our environment.rb file. For example:
This is a nasty bug and I hope it gets fixed soon. It's unfortunate
Rails does not deal with namespaces properly -- at least I think it's a
Rails issue.