Database tables


#1

I have been assigned a task of building a front end to a database that
has already been created. All the database tables have the naming
convention of lclclcClclclc. For example; tblComputerNames. How do i
get around this in rails since it likes lower case table names to keep
with its naming conventions for classes and objects?

Mitch

Mitch Raful MCSE, CCNP
Network Engineer
MCCS Quantico
3044 Catlin Avenue
Quantico, VA 22134


#2

Mitch,

Have a look at ActiveRecord::Base set_table_name over here:

http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M000740

You might also want to look at set_primary_key also in
ActiveRecord::Base

-christos


#3

Raful Mr Mitchell H wrote:

I have been assigned a task of building a front end to a database that
has already been created. All the database tables have the naming
convention of lclclcClclclc. For example; tblComputerNames. How do i
get around this in rails since it likes lower case table names to keep
with its naming conventions for classes and objects?
You can specify the individual table names in each model with
set_table_name… I can’t think of anything easier off the top of my
head, other than a custom generator for the model files.