I have a single table inheritance model for some classes
Payment < ActiveRecord::Base
CreditCardPayment < Payment
ECheckPayment < Payment
ManualPayment < Payment
they all get persisted to the payments table
I’m getting an error: ‘uninitialized constant Payment’ when trying to
create a new instance of any of these classes. At one point in my
process I store the payment in a session variable, but I’ve it seems
random as to when this happens: before or after that gets set. I even
tried explicitly requiring the payment class in the sub classes, and
still get the error.
I’m using Webrick on ruby 1.8.3 installed on cygwin on a Windows XP
machine.
Any ideas what’s going on? As I’m sure we all are, I’m under a time
crunch, and this is an unexpected error. Please help!