Tuesday, January 27, 2009

"Anonymous modules have no name to be referenced by" in Rails 2.2

I was trying to adapt DrySQL to JDBC and I run into a curious error with Rails 2.2. DrySQL was calling Inflector.demodulize(a_string) and every time it did I got an "Anonymous modules have no name to be referenced by" error. It turn out that the fix is to call demodulize from the string itself like this:

a_string.demodulize

0 comments: