class String

def demodulize

See also +deconstantize+.

'Inflections'.demodulize # => "Inflections"
'ActiveRecord::CoreExtensions::String::Inflections'.demodulize # => "Inflections"

Removes the module part from the constant expression in the string.
def demodulize
  ActiveSupport::Inflector.demodulize(self)
end