Tableize Method

This is a convenient way to discover database names from model names. This is handy when you create a linking join table in a M to M relationship. Consider this model:

Screen Shot 2015-03-20 at 3.50.40 PM

 

 

 

The tableize method will return the database table name to be used. The method uses the pluralize method to name the last word in the table name.

Screen Shot 2015-03-21 at 8.59.51 PM

Leave a comment