sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

String#tableize

Creates the name of a table like Rails does for models to table names. This method
uses the +pluralize+ method on the last word in the string.

  'RawScaledScorer'.tableize # => "raw_scaled_scorers"
  'egg_and_ham'.tableize     # => "egg_and_hams"
  'fancyCategory'.tableize   # => "fancy_categories"

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/inflections.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-String-tableize-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/inflections.rbgit commit -m "better docs for String#tableize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-String-tableize-for-pr

hub pull-request


# Celebrate!