Get plural version of Rails model name
PaymentMilestone.model_name.plural
>PaymentModel.name.tableize
=> "payment_milestones"
One fewer call, and more transparent, than the current accepted answer (PaymentModel.name.tableize
).
A few method calls, but this works:
> PaymentMilestone.name.underscore.pluralize
=> "payment_milestones"