we could use lingo.en.isSingular() to detect and auto-magically support this
I suppose it depends on how opinionated you want to be.
we definitely have to be flexible, but I think we can do magic, and retain the flexibility
Makes sense to me.
You mean that resource('profile', actions) makes a singular resource and resource('users', actions) a plural one, right? This seems intuitively appealing, but you know someone's going to try resource('sheep', actions) don't you? So maybe you do need some way of disambiguating or over-riding the convention.
Also, presumably people will immediately start wanting to use different languages. Words ending in 's' will look the same singular and plural in French, also Spanish apparently.
that's the idea, it would basically just expand at the API level, so something like resource('profile') would make a call to say singularResource('profile') similar, allowing the call to be explicit when needed but still adding some sugar on top of the high level portion of the API. Just a thought.
It's a very good thought, but you might be wise to expose singularResource anyway, to get round the awkward cases.
yup, that's the plan
I still like the idea of using magic, but I've just sent a pull request with a different way of doing it.
I'm sure I must have missed something, otherwise it's too easy.
I guess nobody is working on this anymore?