I am trying to use Ruby on Rails to work with an existing database. The
problem is that, all the table names begin with a captial letter (e.g.
Products). So I did the following changes
in environment.rb, I’ve added under # Include your application
ActiveRecord::Base.pluralize_table_names = false
In class Product, I’ve added
however, if I try to list all the elements in the Products table
(@products = Product.find(:all)) , I have the following error:
RuntimeError: ERROR C42P01 Mrelation “products” does not exist
Fnamespace.c L200 RRangeVarGetRelid: SELECT * FROM Products
but when I create another table with name “products”, it worked fine.
Is there any way to solve this problem?
Thank you very much!