instance method
tableize
Ruby on Rails 7.0.10
Since v2.2.3Signature
tableize(class_name)
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.
tableize('RawScaledScorer') # => "raw_scaled_scorers" tableize('ham_and_egg') # => "ham_and_eggs" tableize('fancyCategory') # => "fancy_categories"
Parameters
-
class_namereq
Source
# File activesupport/lib/active_support/inflector/methods.rb, line 192
def tableize(class_name)
pluralize(underscore(class_name))
end
Defined in activesupport/lib/active_support/inflector/methods.rb line 192
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector