KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 the result is a NameError: NameError: undefined method address_line_1' for class LeadImport::Base' Yet I can access the attribute: LeadImport::Base.new.address_line_1 #=> nil (not error) My class has a table column named address_line_1 , so I fail to see the problem. class LeadImport::Base < ActiveRecord::Base alias_method :address_1, :address_line_1 end specs: Ruby 1.8.7, Rails 2.3.8
Tags (comma-separated)
Save Edits
Cancel