@@ -1457,13 +1457,33 @@ The method +tableize+ is +underscore+ followed by +pluralize+.
"Person".tableize # => "people"
"Invoice".tableize # => "invoices"
-"InvoiceLine".tableize # => "invoice_lines"
+"InvoiceLine".tableize # => "invoice_lines"
As a rule of thumb, +tableize+ returns the table name that corresponds to a given model for simple cases. The actual implementation in Active Record is not straight +tableize+ indeed, because it also demodulizes de class name and checks a few options that may affect the returned string.
NOTE: Defined in +active_support/core_ext/string/inflections.rb+.
+The method +classify+ is the inverse of +tableize+. It gives you the class name corresponding to a table name: