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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---