Skip to content

Instantly share code, notes, and snippets.

@richardsondx
Last active March 18, 2020 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardsondx/d2b2fb666bfd56a726c67840d7a9180a to your computer and use it in GitHub Desktop.
Save richardsondx/d2b2fb666bfd56a726c67840d7a9180a to your computer and use it in GitHub Desktop.
Humanize Method
class String
# ..... some code
#
# See ActiveSupport::Inflector.humanize.
def humanize(capitalize: true, keep_id_suffix: false)
ActiveSupport::Inflector.humanize(self, capitalize: capitalize, keep_id_suffix: keep_id_suffix)
end
# .... more codee
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment