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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---