I have a model inheriting directly from ActiveResource::Base
, and I\'m trying to run alias_method
for most of the columns in the record\'s table, but t
According a site I found, you're supposed to use alias_attribute instead:
The problem is that ActiveRecord doesn't create the accessor methods on the fly until the database connection is live and it has parsed the table schema. That's a long time after the class has been loaded.
class LeadImport::Base < ActiveRecord::Base
alias_attribute :address_1, :address_line_1
end