Hi,
I'm getting the following error with a plugin I'm using on rails 2.1 :
Plugins::Restful-authentication::Lib" is not a valid constant name!
The plugin gets installed in a directory named /vendor/plugins/restful-authentication.
I traced this error down to the camelize function. The doc mentions this:
+camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces.
Does this suggest that the output of camelize are accepted constant names?
Should this never raise a NameError? :
ActiveSupport::Inflector.constantize(any_string.camelize)
for example:
ActiveSupport::Inflector.constantize("ace/foo-bar/a".camelize)
Is the opinion that only directories and file names matching /\w*/ are accepted? And they can't start with a digit? Or should we support the above case where a directory contains a minus sign?
Lawrence