Forum: Ruby on Rails plural to singular blunder

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sean B. (Guest)
on 2006-03-28 16:57
(Received via mailing list)
I just got this error:

uninitialized constant PriceCurf

After much head scratching I remembered the Rails plural to singular
mapping rules. My table is price_curves, my object is PriceCurve ...
whereas I am guessing Rails thinks the singular ought to br PriceCurf

I'm sure there is a simple way around this linguistic blunder that
doesn't involve the use of pigeon English.

Funny though.
Michael Kaiser (Guest)
on 2006-03-28 17:07
(Received via mailing list)
Sean B. wrote:
> doesn't involve the use of pigeon English.
> Funny though.

Check to
see how you can add exceptions to the rules Rails uses for the
tranformations from class to table names and such...

Sean B. (Guest)
on 2006-03-28 17:10
(Received via mailing list)
Just adding the :class_name parameter seems to override the default
inference. That's a very acceptable work around.
This topic is locked and can not be replied to.