Skip to content

Instantly share code, notes, and snippets.

@harukizaemon
Created June 7, 2010 10:48
Show Gist options
  • Select an option

  • Save harukizaemon/428527 to your computer and use it in GitHub Desktop.

Select an option

Save harukizaemon/428527 to your computer and use it in GitHub Desktop.
module UnderscoredWithoutPluralizationWithoutModule
def self.call(name)
ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment