I have a polymorphic thingy called fields and I need to on each and every model, so I'd like to do the has_many from the base class, like this...
ActiveRecord::Base.class_eval do has_many :fields, :as => :model, :dependent => true end
It fails with this no method error (class_of_active_record_descendant)
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/ base.rb:1369:in `class_of_active_record_descendant':NoMethodError: undefined method `abstract_class?' for Object:Class
Is there a better way to do this???