intridea/grape — pull request #609 by stevschmid (2014-03-27 20:17:40+00:00)
Title: Revise #582 by changing the way how OPTIONS routes are added

This PR addresses the issue described in #598. The culprit was the PR #582 which addressed #572 (OPTIONS was broken for paths with versioning). My solution to the problem back then was to work with the "raw" path information of all endpoints instead of using the final routes, because latter contain the `/:version` information already. The solution was too simple to address complex nesting and namespacing.

This PR reverts the way the OPTIONS paths are collected and addresses the `/:version` issue (of #572) by disabling the addition of path url versioning when the OPTIONS routes are added. I'm not sold on this solution however (feels like a hack), but it might help someone to find a more elegant solution.