Forum: Ruby on Rails ActiveRecord and columns with spaces or strange characters

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Brian H. (Guest)
on 2006-03-28 18:26
(Received via mailing list)
I'm interested in modifying ActiveRecord to do some column name

Right now I have a database with some interesting column names...

 part #
 warrany exp. date

ActiveRecord doesn't even complain about these columns... in fact, I can
load data just fine. However, I can't retrieve data from the 'part #'
or the "warranty exp. date" field because the methods are not found.
likely, they can't be built automatically by active record.

Can someone guide me a bit on how I would go about addressing this
I'm not entirely sure how the automatic mapping lifecycle works so I
know where to insert code to do some translations.  I would assume that
have to do translations on the reader methods as well as the writer

Help would be much appreciated!
This topic is locked and can not be replied to.