Method: Sequel::Inflections.plural
- Defined in:
- lib/sequel/model/inflections.rb
.plural(rule, replacement) ⇒ Object
Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.
Example:
plural(/(x|ch|ss|sh)$/i, '\1es')
72 73 74 |
# File 'lib/sequel/model/inflections.rb', line 72 def self.plural(rule, replacement) @plurals.insert(0, [rule, replacement]) end |