Sha256: 2615c69122963c40970339a12dde53d18d6365bdc969c62d7dfe76ab6bc3f430
Contents?: true
Size: 729 Bytes
Versions: 11
Compression:
Stored size: 729 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module String #:nodoc: module Inflections #:nodoc: ActiveSupport::Inflector.inflections do |inflect| inflect.singular("address", "address") inflect.singular("addresses", "address") inflect.irregular("canvas", "canvases") end REVERSALS = { "asc" => "desc", "ascending" => "descending", "desc" => "asc", "descending" => "ascending" } def invert REVERSALS[self] end def singular? singularize == self end def plural? pluralize == self end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems