# ActiveRecord and columns with spaces or strange characters

**URL:** <https://www.ruby-forum.com/t/activerecord-and-columns-with-spaces-or-strange-characters/56177>\
**Category:** Rails\
**Created:** [March 28, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/activerecord-and-columns-with-spaces-or-strange-characters/56177 "2006-03-28T16:26:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a587f6/32.png) [@kuma](https://www.ruby-forum.com/u/kuma)\
**Post date:** [March 28, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/activerecord-and-columns-with-spaces-or-strange-characters/56177/1 "2006-03-28T16:26:55Z")

</div>

I’m interested in modifying ActiveRecord to do some column name  
transformations.

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

sequence  
computername  
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 #’  
field  
or the “warranty exp. date” field because the methods are not found.  
Most  
likely, they can’t be built automatically by active record.

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

Help would be much appreciated!
