tableize will pluralize your row if the original was single or multiple, and underscore will only add underscores.
Although this may seem trivial, it all refers to abstracting the details of the database implementation from the developer. If in the future Rails began to format table names differently, the only way to change it would be tableize . All other places in the Rails code that reference table names can remain unchanged, because they still call the tableize method. Therefore, a change in the basic structure of the rails is limited and much less destructive.
This is called "orthogonality" in computer science. Now that you know what this means, try to drop it in a conversation to make yourself look smarter. Did it work for me? :)
source share