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