maccman/spine — pull request #146 by OriPekelman (2011-11-25 17:06:07+00:00)
Title: Add correct pluralization for it to work with rails styles pluralization

I am using spine with rails (using gem "spine-rails"). Pluralization is currently done "naively" by adding an "s" to the singular model name. Which results in incorrectly pluralizing "story" with "storys".

The proposed patch uses a CoffeeScript version of https://github.com/rxgx/inflection-js/blob/master/inflection.js to have the pluralization compatible with Rails style pluralization.

I did not want to change the original library except CoffeeScripting it, so there are methods in the lib that will be YANGI. Also note that this modifies the String prototype which some consider to be extremely evil.

Attached a test case, and tested under recent versions of Safari, Chrome and Firefox

I propose to bump the version as this is an api change.