From: Bob Showalter Date: 2007-06-29T07:08:38+09:00 Subject: Re: ActiveRecord (not necessarily rails) On 6/27/07, shawn bright wrote: > Hello all, > i have been using ActiveRecord in a couple of GUI applications recently and > it is working really well. > i was wondering though, if it is possible to have a class defined that i can > change one of the has_many or belongs_to declarations > dynamically. In a model, i declare one like this. > > class Person ActiveRecord::Base > has_many :records > > now, is the has_many some sort of attribute, class variable, etc... has_many is a class method. > i mean if in my program, i wanted to change the > has_many :records to something like > has_many :hats > > how could i do that? This sounds like an "XY problem" (http://www.perlmonks.org/index.pl?node_id=542341). What are you trying to accomplish?