Was hoping someone might point me in the right direction here.
In environment.rb, I've an inflector rule like so:
inflect.irregular "serve", "serves"
And a model User, with a habtm :serves
From the console, "serves".singularize returns "serve."
However, for any User u, calling u.serves throws:
NameError: uninitialized constant User::Serf
I've been using :class_name => 'Serve' option for the habtm
declaration as a workaround.
I've tried other inflector methods, and used namespaced strings like
"namespace::serve" but nothing seems to work.
What blows my mind is that the call to singularize works correctly,
but AR isn't.
Thanks for any pointers.