# Anonymous class in ActiveRecord

**URL:** <https://www.ruby-forum.com/t/anonymous-class-in-activerecord/50088>\
**Category:** Rails\
**Created:** [December 12, 2005, 10:36pm UTC](https://www.ruby-forum.com/t/anonymous-class-in-activerecord/50088 "2005-12-12T22:36:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitesurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kitesurfer](https://www.ruby-forum.com/u/kitesurfer)\
**Post date:** [December 12, 2005, 10:36pm UTC](https://www.ruby-forum.com/t/anonymous-class-in-activerecord/50088/1 "2005-12-12T22:36:04Z")

</div>

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 !!
