[Rails] rename associations

John-Mason P. Shackelford john-mason at shackelford.org
Tue Mar 1 21:49:50 GMT 2005


Greetings all,

In looking at the API for ActiveRecord::Associations::ClassMethods there 
doesn't appear to be a way to rename an association. In doing some 
refactoring I am replacing one table with two but want to preserve the 
old associations names, e.g. I want to be able to still say 
build_type.artifacts instead of having to use the new table name: 
build_type.build_type_artifacts. Is an alias my only option or am I 
missing something glaringly obvious?


John-Mason Shackelford

Software Developer
Pearson Educational Measurement

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
john-mason.shackelford at pearson.com
http://pearsonedmeasurement.com


More information about the Rails mailing list