Forum: Ruby on Rails Does Anyone know how to set the table name as "CR_Country" ?

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.
Joshua A. (Guest)
on 2006-05-15 12:54
One issue is there in connecting one schema(table)  "CR_Country" and
"CR_Security" from this sybase Db.

I have set false for pluralize_table_name and also setting the table
name explicitly  too as follow in the "environment.rb" :
ActiveRecord::Base.pluralize_table_names = false

class CR_Country < ActiveRecord::Base
  set_table_name "CR_Country"

Now it gives an error as

not able to find object  "select * from cR_Country"

and another one as :
not able to find object  "select * from cr_security"

It somewhere converted the table name to small letters. Please help me
out if you have any suggestion.

Thanks in advance,
kris (Guest)
on 2006-05-16 23:01
Try overrding Rails default table name with set_table_name "CR_Country"
in the model.
This topic is locked and can not be replied to.