issue with hyphen on column name(legacy db)

0 views
Skip to first unread message

rek2

unread,
Apr 11, 2008, 1:34:59 AM4/11/08
to boston-r...@googlegroups.com
Hi I have a table called active
and another one called authreg
I did a one to one relation but it turns out that one of this legacy
database
column name has an hyphen!!! "-" now im screw how can I tell rails
to use it? or make an alias of some sort like with table names.?

@active = Active.new(
:collection-owner => authreg.username,
:time => "1207840612")


Thanks

--
A Spectre is haunting multinational capitalism--the spectre of free information.
All the powers of ``globalism'' have entered into an unholy alliance to exorcize this spectre:
Microsoft and Disney, the World Trade Organization, the United States Congress and the European Commission.
Eben Moglen from the FSF.
http://emoglen.law.columbia.edu/publications/dcm.html

Solidarity:
http://www.dailyradical.org
http://www.diarioradical.org
http://www.spboston.org
http://www.binaryfreedom.info

rek2

unread,
Apr 11, 2008, 1:40:14 AM4/11/08
to boston-r...@googlegroups.com
rek2 wrote:
> Hi I have a table called active
> and another one called authreg
> I did a one to one relation but it turns out that one of this legacy
> database
> column name has an hyphen!!! "-" now im screw how can I tell rails
> to use it? or make an alias of some sort like with table names.?
>
> @active = Active.new(
> :collection-owner => authreg.username,
> :time => "1207840612")
>
>
> Thanks
>
>
nevermind I used 'coolection-owner' =>
and that seems to do the trick!
Reply all
Reply to author
Forward
0 new messages