Topic: getting table doesn't exist in find

I just upgraded to Rails 3.2 from 2.3.14 and I am getting some really weird behavior.

In one of my models

class UsdaNutData < ActiveRecord::Base
  #establish_connection WEB_MEDIA_DATABASE
  
  belongs_to :usda_nut_def
  belongs_to :master_ingredient
  
end

I do a really simple

UsdsaNuData.find :first

And then it returns me

ActiveRecord::StatementInvalid in Ingredients#show
Mysql2::Error: Table 'foodreka_development.usda_nut_data' doesn't exist: SHOW FULL FIELDS FROM `usda_nut_data`

What is weird is my table is usda_nut_datas.  I don't know why it isn't picking up the right table.

Other models in the system seem to be working fine.  Anyone have any idea of what to troubleshoot?

Re: getting table doesn't exist in find

I just thought that the inflector might not be working and added

set_table_name "usda_nut_datas"

And it works fine.  Did the inflector change from 2.3.14 to 3.2?

Re: getting table doesn't exist in find

There have been some changes along the way.
What do you get if you do

'data'.pluralize

Re: getting table doesn't exist in find

oh hmm.. looks like the pluralize change slightly in Rails 3.2 then before

1.8.7-p358 :011 > 'data'.pluralize
 => "data" 
1.8.7-p358 :012 > 'UsdaNutData'.pluralize
 => "UsdaNutData" 
1.8.7-p358 :013 > 

thanks!