Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #755 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Fix to singuarize plurals of words ending in 'sh' correctly

Reported by: phillip@pjbsoftware.com Assigned to: David
Priority: normal Milestone:
Component: ActiveSupport Version: 0.10.0
Severity: normal Keywords:
Cc:

Description

ActiveSupport pluralizes "sh" words like "brush" properly, but does not singularize them correctly, so that, for example,

class User < ActiveRecord::Base
has_many :brushes

does not work properly, as attempting to access user.brushes will garner many const_missing complaints concerning "Brushe."

I've made a quick fix, and added a rule for the special case of "fish" as well.

I hope it asks me to upload the patch after I submit, because I am not seeing a place to do it right now.

Attachments

singularize_words_ending_in_sh.diff (1.2 kB) - added by phillip@pjbsoftware.com on 02/28/05 23:49:23.

Change History

02/28/05 23:49:23 changed by phillip@pjbsoftware.com

  • attachment singularize_words_ending_in_sh.diff added.

03/06/05 13:43:18 changed by david

  • status changed from new to closed.
  • resolution set to fixed.