Anonymous class in ActiveRecord


#1

Hi,

I have an ActiveRecord subclass called A and it defines a struct as
follows:

class A < ActiveRecord::Base
Fred = Struct.new( :a, :b )

end

No problem using this class, however when I update an instance of A
I get

can’t dump anonymous class Class

I assume it is trying to dump Fred which I would like to be
transient.

How does one tell ActiveRecord no to save transients ??

Thank you all !!