Rails 3.0.5 "datum/data" inflection rules are used for all words ending with "ta" #973

lighthouse-import opened this Issue May 16, 2011 · 3 comments


None yet

5 participants

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6642
Created by kyoto - 2011-03-29 03:55:47 UTC

I understand that Rails 3.0.5 changed the pluralization/singularization rules to support "datum" <-> "data", "stratum" <-> "strata", etc.

However, this seems to causes all words ending with "ta" to be pluralized incorrectly.

For example, "delta".pluralize => "delta" and "quota".pluralize => "quota".

The workaround I am using is to fix individual words by adding a rule to config/initializers/inflections.rb like
inflect.plural /(del|quo)ta$/, '\1tas'

@tomstuart tomstuart pushed a commit to econsultancy/rails that referenced this issue May 17, 2011
@jeremy Daniel Sheppard + jeremy Fix that JSON parser fails to read escaped backslashes.
[#973 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

@josevalim This can be closed.

@josevalim josevalim closed this May 19, 2011
salex commented Jul 30, 2011

I decided to rewrite an application from scratch in 3.1

I had a model Quota, table quotas.

Created the table ok and dbconsole would find it, but reference to the model Quota would give you

ActiveRecord::StatementInvalid: Could not find table 'quota'

After a bunch of looking for reserved words problems I found this. My work around is:

class Quota < ActiveRecord::Base
set_table_name "quotas"

If it is not a problem, it should be documented.

@josevalim The commit referenced above doesn't seem to have anything to do with this issue so it probably had the wrong ticket number. Can we get this reopened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment