Inflector problem?

Hi, i think i have an inflector problem, 'cause my “has_many through”
association is failing like this:

Mysql::Error: #42S22Unknown column
‘prod_thicknesses_prod_codes_join.prod_thicknes_id’ in ‘on clause’:

SELECT
count(DISTINCT prod_codes.id) AS count_all
FROM
prod_codes LEFT OUTER JOIN products
ON
(prod_codes.id = products.prod_code_id) LEFT OUTER JOIN
prod_formats
ON
(prod_formats.id = products.prod_format_id) LEFT OUTER JOIN
products prod_thicknesses_prod_codes_join
ON
(prod_codes.id = prod_thicknesses_prod_codes_join.prod_code_id)
LEFT OUTER JOIN prod_thicknesses
ON
(prod_thicknesses.id =
prod_thicknesses_prod_codes_join.prod_thicknes_id) LEFT OUTER JOIN
products products_prod_codes
ON
products_prod_codes.prod_code_id = prod_codes.id

In the SQL clause, ‘prod_thicknes_id’ should read like
‘prod_thickness_id’ (extra ‘s’ at the word’s end). I tried to manually
inflect the correct behavior but nothing happens!:

enviroment.rb:

Inflector.inflections do |inflect|

inflect.plural /^(ox)$/i, ‘\1en’

inflect.singular /^(ox)en/i, ‘\1’

inflect.irregular ‘person’, ‘people’

inflect.irregular 'thickness', 'thicknesses'
inflect.irregular 'prod_thickness', 'prod_thicknesses'

end

What should i do???

Thanks!

On 6/19/07, Emmanuel O. [email protected] wrote:

inflect.plural /^(ox)$/i, ‘\1en’

inflect.singular /^(ox)en/i, ‘\1’

inflect.irregular ‘person’, ‘people’

inflect.irregular 'thickness', 'thicknesses'
inflect.irregular 'prod_thickness', 'prod_thicknesses'

end

What should i do???

First hackish thought:

Inflector.inflections do |inflect|
inflect.plural ‘thickness’, ‘thicknesses’
inflect.singular ‘thickness’, ‘thickness’
inflect.singular ‘thicknesses’, ‘thickness’
inflect.plural ‘thicknesses’, ‘thicknesses’
end