I work with some legacy schema’s that have some fairly interesting
column names in tables. Unfortunately, because of limitations in other
programs using the tables, I don’t have the option to change anything
about the tables themselves. I need to figure out how to manage the
column names at a “low level” if possible. In fact, it would be nice to
be able to map an encoded value to/from the table so that at my end of
the world (the Rails end) I don’t have to do anything.
The suggestion is to take a look at activerecord and perhaps encode the
columns/attributes with ‘_pound’ so that a column with the name of emp#
would be encoded as emp_pound. Then Rails wouldn’t be complaining as
much. I have also been given the suggestion that I override the column
names but active record seems to complain regardless. What I see in the
, unexpected end-of-file
Exception occurred during reader method compilation.
Maybe emp# is not a valid Ruby identifier?
I have a bunch of columns with this naming convention so the more
“global” the solution, the better. My Ruby skills are relatively meager
so I could use some very specific pointers as to how to approach a
To unsubscribe from this list, please visit: