Making a rails inflection for possessive strings?
- by chovy
I would like to create a method in additional to the default 'foo'.titlecase that will correctly add "possessiveness" to it.
The string is a user's name (<- just did one right there! )
For example: "sam" is the user
<%= user.titlecase.possessive + ' Profile' % = #Sam's Profile
It just needs to handle edge cases like:
Steelers's Profile ( should be Steelers' Profile)
Ross's Profile ( should be Ross' Profile )