In my project, I’ve created an abstract model that my real models
inherit from. In my abstract model, I’ve overridden method_missing so
that I can use attribute names without the field type prefix from the
legacy database, without having to set up alias_attribute for every
attribute in every table.
class LegacyModel < ActiveRecord::Base
self.abstract_class = true
def method_missing(symbol, *args)
…do some stuff…
This all worked fine in Rails 2.0.2. It still works in Rails 2.2.2,
but now not across a belongs_to association. It does work across a
Anyone have any ideas on either a better way to handle the attribute
names, or where to start looking to figure out how to make this work?
Que Viva, LLC