module ActiveSupport::Inflector
def tableize(class_name)
tableize('ham_and_egg') # => "ham_and_eggs"
tableize('RawScaledScorer') # => "raw_scaled_scorers"
This method uses the #pluralize method on the last word in the string.
Creates the name of a table like \Rails does for models to table names.
def tableize(class_name) pluralize(underscore(class_name)) end