Forum: Ruby on Rails Anonymous class in ActiveRecord

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
De R. (Guest)
on 2005-12-12 23:36
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 !!
This topic is locked and can not be replied to.