Unfortunately I had to work on some proprietary MSSQL database building some internal web application. Naturally, I use RoR 1.2.4. Even I add set_table_name and set_primary_key in Model (RegionalIndex) of mine it have made SQL requests using regional_indexes as a table name. After spending some time I come with the solution witch puzzled me a bit.
The model is looks as follows: class Regionalindex < ActiveRecord::Base set_table_name "RegionalIndex" set_primary_key "IndexID" end
and it not works as expected.
When I change it to class Regionalindex < ActiveRecord::Base ActiveRecord::Base.set_table_name "RegionalIndex" ActiveRecord::Base.set_primary_key "IndexID" End
everything is performing OK.
Do you think it's a little puzzling?