Forum: Ruby on Rails why sqlserver column with 'user_id' can not display in rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
jesse cai (Guest)
on 2006-02-08 12:49
(Received via mailing list)
Hi,

I have a table with columns : id,user_id,nickname,create_time. and i
create my rails application , with scaffold, it can not display user_id
column, others are correct, Why?

--
Best Regards,

Caiwangqin
http://www.uuzone.com
Mobile:  +8613951787088
Tel:  +86025-84818086 ext 233
Fax: +86025-84814993
Mikkel B. (Guest)
on 2006-02-08 13:31
(Received via mailing list)
On Wednesday, February 08, 2006, at 6:48 PM, jesse cai wrote:
>Hi,
>
>I have a table with columns : id,user_id,nickname,create_time. and i
>create my rails application , with scaffold, it can not display user_id
>column, others are correct, Why?
>
>--

I guess the scaffold code filters out fields called _id...

Is this a bug? Perhaps...but the general approach in Rails is to only
use _id for associations. Instead of user_id use username or login


Mikkel B.

www.strongside.dk    - Football Portal(DK)
nflfeed.helenius.org - Football News(DK)
ting.minline.dk      - Buy Old Stuff!(DK)
This topic is locked and can not be replied to.