instance method
tableize
Ruby on Rails 2.2.3
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.
Examples
"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.rb, line 295
def tableize(class_name)
pluralize(underscore(class_name))
end
Defined in activesupport/lib/active_support/inflector.rb line 295
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector