Possible Duplicate:
Alias for column names in Rails
I'm writing a module of ActiveRecord models to access a MySQL legacy database. My problem is that the database has a column naming convention that looks like this: groupID
, metaGroupName
, flagName
. Is there an easy way to make the models play nice with this naming convention?
Update:
I'd like to avoid the alias_attribute
method if possible. It's not a small database, and that would be a lot of columns to alias. Is there a method in ActiveRecord that interprets column names that I can override, perhaps?