The previous versions of decent_exposure exposed the singular resource when you exposed a resource, which has no plural:
This used to expose a singular resource but with decent_exposure 2.0 it exposes the collection. Of course this breaks our application and is not handy to fix.
Since the collection can more easily be represented with the block form I suggest to change the behavior back to how it was.
if respond_to?(collection) && collection != name.to_s && send(collection).respond_to?(:scoped)
I think it would be enough to add the collection != name.to_s to the plural? query.
collection != name.to_s
Implementation aside, we shouldn't be treating the exposure as the collection when the resource is "uncountable". Thanks for catching this. I've added a 2.0.1 release milestone and added this to it. Please feel free to submit a pull request, otherwise @jgdavey or I will get to it as soon as we can.
Thanks for the heads-up.
For uncountable resources, assume singular
This fixes #60