module

Noir::RubyInflector

The common subset of ActiveSupport's singular rules, applied to the word's tail as Rails does (scheduled_statuses -> scheduled_status). Shared by the Rails analyzer (nested route keys such as :status_id) and the auth tagger (the model CanCanCan derives from a controller name), so both have to agree with Rails. ponytail: no -ves/-oes/-ices rules and a short irregular list; add one when a name comes out wrong.

Constants

SINGULAR_IRREGULARS = {"people" => "person", "men" => "man", "children" => "child"}

Class methods

pluralize(name : String) : String

The regular-English subset of ActiveSupport's pluralize (project -> projects, policy -> policies, box -> boxes). ponytail: no irregulars; add one when a name comes out wrong.

Source
singularize(name : String) : String
Source