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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060228/24ddd0a4/attachment.html
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 On 28 Feb 2006, at 15:50, 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? > > Mitch > Mitch Raful MCSE, CCNP > Network Engineer > MCCS Quantico > 3044 Catlin Avenue > Quantico, VA 22134 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
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. -- Alex