Namespace is not compatible with multi_route extension? #39

sinm opened this Issue Mar 11, 2012 · 6 comments


None yet

4 participants

sinm commented Mar 11, 2012

Look here for some tests.

@kytrinyx kytrinyx added a commit that referenced this issue Dec 8, 2012
@kytrinyx kytrinyx Add failing tests for issue #39 c4eecb9

Any progress on this?


No, sorry. The way they're implemented I wasn't able to figure out a way to make them compatible. There has to be a way, I just couldn't see it.


Yeah I messed around with it for an hour or so too and didn't see an obvious way. My ruby skills are lacking.


Seems like namespace doesn't play nice with most Sinatra add-ins. (Unless I'm mistaken) it's virtually worthless unless you are going to do strictly plain-vanilla Sinatra code. Sigh...


#136 is a duplicate of this, and I added an idea there to get multi_route working with namespace. However, you are correct that namespace is not going to work by default with other Sinatra extensions that modify how routes are defined, or anything else where the class level behavior is modified.


In short, the answer to the original question is: "No", unfortunately.

Having dug into the namespace extension, I don't think that it is feasible to make it work with the other extenions. I'd be happy to help document other ways of accomplishing workarounds.

@sinm I'm going to close this, but if you would like help finding a workaround, please feel free to post an issue describing what you're trying to accomplish.

@kytrinyx kytrinyx closed this Jul 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment