Marcel,
For some whacky reason it has to do with your extension to String:
class String
def underscore
gsub(/([A-Z]+)([A-Z][a-z])/,‘\1_\2’).
gsub(/([a-z\d])([A-Z])/,‘\1_\2’).
downcase
end
end
If I get rid of that, I’m able to get at my controllers.
Basically what I’ve been doing is to load the dev console, test that I
can
access the controllers (i.e. Account::AccountController), then require
the
s3/extensions.rb file manually, and then see what happens when I require
another namespaced controller (i.e. Account::ArtistController). With the
library as it is, once I require the extensions file I can no longer get
at
my controllers, and it fails with load_missing_constant throwing
“uninitialized constant”. If I get rid of the extension to String, it
doesn’t fail anymore and I get get at all of my controllers even after
requiring extensions.
So, it doesn’t appear to be your const_missing_from_s3_library function
(which is very cool, by the way! I’ll be sure to use that. I don’t think
it
made it into the docs, did it?), but is instead the underscore function
on
String.
I believe that it is overriding the underscore extension to string in
ActiveSupport::CoreExtensions::String::Inflections#underscore. Since
Inflector is used to derive the controller file names for inclusion, I
think
this is what’s causing the problem.
Matt
On 11/29/06, Marcel Molina Jr. [email protected] wrote:
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:260:in
immediately apparent to me how this could affect things, but I suspect
const_missing shouldn’t be getting in the way since it’s chaining back to
the
original.
marcel
Marcel Molina Jr. [email protected]
–
Matt W.
Thermal Creative
http://blog.thermalcreative.com